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

Re: regex challenged

by redgreen (Priest)
on Oct 07, 2009 at 20:21 UTC ( #799805=note: print w/replies, xml ) Need Help??


in reply to regex challenged

Besides using placeholders as moritz said, it is always easier to test for characters you want allowed (a known set) in a regex, rather then trying to come up with what isn't allowed (an unknown large set).

if ( $User =~ /^[a-z0-9]+$/i ) { # Allowed }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://799805]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-02-22 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (335 votes). Check out past polls.