I substituted 2 for the first digit of the area code and prefix for each of
them:
200-200-0000
(200) 200-0000
etc.
Spike
--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk
Do you cfeclipse? http://cfeclipse.tigris.org
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Matt Robertson
>Sent: Monday, August 02, 2004 10:04 AM
>To: CF-Talk
>Subject: Re: Stupid telephone regex question
>
>Sorry, I should have specified U.S. phone number. Realized it right
>after my post.
>
>The regex *should* accept numbers formatted as such:
>
>000-000-0000
>(000) 000-0000
>(000)000-0000
>000.000.0000
>
>where the zeroes represent a digit range from 2-9 in the first
>position, of area code and prefix, and any digit in any other
>position.
>
>I picked up this regex from a web site somewhere. Can't find
>it at the moment.
>
>The regex from Ben's book is
>
>\(?[2-9]\d\d\)?[ -]?[2-9]\d\d-\d{4}
>
>and accepts a more limited range. I could live with that, actually.
>Not married to the accept-multiple-formats idea.
>
>Yes this is CF 6.1. Don't have to make this one backward-compatible.
>
>ReFind is being used as part of a generic field validation processor.
>I can plug in a custom regex but the method of applying it has to be
>via ReFind. If refind returns zero I know the test failed.
>
>The only time refind hasn't worked for me as shown is when I screw up
>the regex. Is there a better way to do this?
>
>--
>--Matt Robertson--
>MSB Designs, Inc.
>mysecretbase.com
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

