Build, test, and debug regular expressions
Matches a run composed entirely of zeros, anchored at a word boundary and the end of a line (multiline flag), so it only fires on lines whose word is all zeros like "0000". The lazy group captures just the first '0' while the trailing 0+ consumes the remaining zeros, making it ideal for a replace-with-$1 that collapses redundant trailing zeros down to a single '0'.