Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985616]
help
Chatterbox?
[MidLifeXis]: hahaha: Just received a buzz-word-bingo- compliant email (internal) that starts with "%Firstname% %Lastname%...". It only gets better from there.
choroba finds working in a small company boring comparing to a large corporation
[MidLifeXis]: At least test before mass distribution.
[MidLifeXis]: More opportunities for anonymous snafus :-)
[MidLifeXis]: In a small group / company, at least you know who needs to buy the next round of beer for their mess-up.
[MidLifeXis]: :-)
[Discipulus]: are sure you are not really named "%Firstname% %Lastname%..." ? have you check your identity card?
[Discipulus]: Bobby Tables?

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-01-19 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.