in reply to Tweak for my Perl Regex that screens for digits only
Update: Off the top of my head, my (simplistic) approach would be something like:
Which seems to tell the difference happily between:unless ($FORM{phone} =~/^(?:Ext|\d+|\)|\(|\.|\s|\+)+$/i){
and+44 (1234) 0123456 Ext 123
This is a test
--------------------------------------------------------------
"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
John Brunner, "The Shockwave Rider".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tweak for my Perl Regex that screens for digits only
by hackermike (Novice) on Jan 25, 2006 at 19:32 UTC | |
by g0n (Priest) on Jan 25, 2006 at 19:41 UTC | |
by ysth (Canon) on Jan 26, 2006 at 11:33 UTC | |
by hackermike (Novice) on Jan 25, 2006 at 19:50 UTC | |
by SamCG (Hermit) on Jan 25, 2006 at 19:47 UTC | |
|
Re^2: Tweak for my Perl Regex that screens for digits only
by hackermike (Novice) on Jan 25, 2006 at 18:58 UTC |