Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Perl: the Markov chain saw
 
PerlMonks  

Re: Regular expressions

by dragonchild (Archbishop)
on Apr 13, 2005 at 09:45 UTC ( [id://447378]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Regular expressions

Alternately, you can make sure that it doesn't contain characters that aren't the class.
if ( $temp2 =~ /[^a-zA-Z]/ ) { die "Wrong input"; } else { # Do something useful }

This is a very strong way to work. You're whitelisting and not blacklisting, which is best.

Replies are listed 'Best First'.
Re^2: Regular expressions
by DDH (Initiate) on Apr 13, 2005 at 10:08 UTC
    Thanks for the information

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447378]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.