No such thing as a small change | |
PerlMonks |
Re^2: regex meaningby bart (Canon) |
on Nov 12, 2007 at 15:03 UTC ( [id://650283]=note: print w/replies, xml ) | Need Help?? |
(I agree with what you say, but... I think a little simplification may be in order.)
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 Section
Seekers of Perl Wisdom
|
|