Is this in CFMX?  This won't work in CF5 or earlier.  They don't
recognize \d as digits.

--Ben

Matt Robertson wrote:

> I'm trying to use this code and it keeps throwing out the string
> whether its valid or not.  I know I'm doing something wrong but am a
> dilettante at best when it comes to regexes.  I also tried Ben Forta's
> phone regex out of his book with similarly bad results, so its
> definitely me doing something stupid here.
>
> ThisRegex="[\(.]?[2-9]\d\d[\).]?[ -]?[2-9]\d\d[-.]\d{4}";
>
> if (not REFind(ThisRegex, form.myphonefield) {
> ...
>
> What is my coffee-starved Monday morning brainlet missing here?
>
> --
> --Matt Robertson--
> MSB Designs, Inc.
> mysecretbase.com
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to