Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 }


Comment on Re: regex challenged
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (14)
As of 2015-07-07 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls