Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: check if string contains anything other than alphanumeric

by FunkyMonk (Canon)
on Aug 12, 2007 at 09:05 UTC ( #632037=note: print w/ replies, xml ) Need Help??


in reply to Re^2: check if string contains anything other than alphanumeric
in thread check if string contains anything other than alphanumeric

If a character class starts with ^, it is a negated character class. That is, it will match any character that is not in the class. So, /[^a-zA-Z0-9]/ will match any character that is not a letter or digit.

See perlretut for a tutorial on regexps and perlre for the details.

update: My 200th node :)


Comment on Re^3: check if string contains anything other than alphanumeric
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2015-03-30 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (633 votes), past polls