in reply to Re: Remove zero padding from excel mangled Ip addresses
in thread Remove zero padding from excel mangled Ip addresses
Just a nitpick, cuz you did tell him to play with it, but notice that CDU01V43 got changed to CDU1V43... that is most likely not an expected behavior. The above regex removes all 0's unless preceded by a number and followed by a number, which means words with 0's in them will be removed as long as there's a digit following them.
So you might want to split on commas and detect an IP address (dotted quartet) prior to running the above regex (which works great on all IPs I tested).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Remove zero padding from excel mangled Ip addresses
by GrandFather (Saint) on Mar 21, 2012 at 22:42 UTC | |
by raybies (Chaplain) on Mar 22, 2012 at 14:44 UTC |
In Section
Seekers of Perl Wisdom