Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: A Regex simple Question

by ikegami (Patriarch)
on Sep 06, 2007 at 16:11 UTC ( [id://637470]=note: print w/replies, xml ) Need Help??


in reply to Re: A Regex simple Question
in thread A Regex simple Question

That will fail (false negative) for a000ab.

Replies are listed 'Best First'.
Re^3: A Regex simple Question
by moritz (Cardinal) on Sep 06, 2007 at 16:36 UTC
    You are right. That can easily be ammended by changing it to /^a(?!.*ab.).*b$/.

    Regexes are hard, sometimes. Especially corner cases ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-25 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found