Simple string manipulation...

I'm trying to figure out how to check a string in perl/cgi to make sure it has at least 1 number and 1 capital letter for a login page i'm making. Any help would be appreciated. Thanks/
Who is Participating?
print "YES!" if $string =~ /[A-Z]/ and $string =~ /[0-9]/;
sousufferAuthor Commented:
Thanks for the help. Much appreciated.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.