in reply to Remove zero padding from excel mangled Ip addresses

the regexp you want to use is s/\b0+(?=\d)//g:
while (<>) { my @csv = split /,/; s/\b0+(?=\d)//g for @csv[0,2]; print join(',', @csv), "\n"; }

Replies are listed 'Best First'.
Re^2: Remove zero padding from excel mangled Ip addresses
by Anonymous Monk on Apr 03, 2012 at 13:48 UTC
    What would be the full code that I pasted into the excel module to get this work. I am new to regex and would like to learn it. Usually if I see the code I can reverse engineer it and understand it. Thanks, JRich