
parmenides
Deleted
Nov 25, 2000, 8:23 AM
Post #1 of 2
(3349 views)
|
Newbie regex perplexity...
|
Can't Post
|
|
I'm putting together a form validation/email CGI script and am completely new to Perl. The CGI part is actually working quite well, but I can NOT seem to get the hang of Perl's flavor of regex. For form validation, I want to allow the user to enter the following characters in a telephone field: 0123456789-.() and spaces How do I put togther the regex for this? Checking for numbers works great: if ($value and $value =~ /\D/) {tag error here} But EVERYTHING I've tried to allow typing the other characters causes the check to always fail. Can someone help me get my bearings here? Thanks! [This message has been edited by parmenides (edited 11-25-2000).]
|