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
In Section
Seekers of Perl Wisdom
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