Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: validate a form field with regexp?

by davido (Archbishop)
on Apr 21, 2012 at 03:42 UTC ( #966301=note: print w/ replies, xml ) Need Help??


in reply to validate a form field with regexp?

if( $input =~ m/^(SR\d{7})$/ ) { print "User entered $1: OK.\n"; } else { print "Invalid input.\n"; }

Have a look at perlretut.


Dave

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2016-06-24 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (322 votes). Check out past polls.