The reason for the lookahead (?=\d) is so it wouldn't replace a string "0000" with "", but with "0", by requiring at least one remaining digit.
So the purpose is to strip leading zeros from strings that look like numbers, but leave a significant "0".
In reply to Re^2: regex meaning
by bart
in thread regex meaning
by hashin_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |