Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: regex meaning

by bart (Canon)
on Nov 12, 2007 at 15:03 UTC ( [id://650283]=note: print w/replies, xml ) Need Help??


in reply to Re: regex meaning
in thread regex meaning

(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".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://650283]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found