Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Regexp experts, come to rescue!

by mirod (Canon)
on Feb 01, 2001 at 20:08 UTC ( [id://55727]=note: print w/replies, xml ) Need Help??


in reply to Regexp experts, come to rescue!

Apart for the previous problem you should also anchor your regexps:

/^-[45][15j]$/ # note the ^ and $

otherwise you will match the regexp anywhere in the string: "toto-45tata" would match

Then your interpretation is right, otherwise it would be
if any character is '-' followed by 4 or 5 followed by 1 or 5 or j...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found