Thanks Ben.
-----Original Message-----
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2003 2:42 PM
To: CF-Talk
Subject: Re: RegEx Question...
Assuming you are requiring the 1- and the area code:
1-[0-9]{3}-[0-9]{3}-[0-9]{4}
Something more flexible might be
((1-)?[0-9]{3}-)?[0-9]{3}-[0-9]{4}
HTH.
--Ben Doom
Che Vilnonis wrote:
> Real simple questionfolks...I use something like this to flag invalid
> zipcodes:
>
> <cfscript>
> if (NOT (REFind('^[[:digit:]]{5}(( |-)?[[:digit:]]{4})?$',FORM.ZIP) NEQ
0))
> {}
> </cfscript>
>
> What RegEx would work to validate a US phone number in a 1-888-555-1212
> format?
>
> Thank again...Che
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RegEx Question... Che Vilnonis
- Re: RegEx Question... Ben Doom
- Che Vilnonis