Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Regex for last digit should not be "2"

by Kenosis (Priest)
on Aug 06, 2012 at 07:02 UTC ( #985616=note: print w/ replies, xml ) Need Help??


in reply to Regex for last digit should not be "2"

...last digit should not match digit "2"...

If the last character in the string you want to match will always be a digit, then the following will work:

if ($folder =~ /^M2000AAMFAD201[^2]$/){ ...

Hope this helps!


Comment on Re: Regex for last digit should not be "2"
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2014-09-18 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (121 votes), past polls