Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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


Comment on Re: validate a form field with regexp?
Download Code

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 meditating upon the Monastery: (17)
As of 2015-07-02 09:20 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 (33 votes), past polls