It is possible natively in PostgreSQL ....
select * from mytable where myfield ~ '[0-9]{3}-[0-9]{4}'
... so it depends on which DB you're using.
Also ... my sincere apologies to those on the list if I had a few bounces from my spam filter (tmda). I hate when people do that!
[EMAIL PROTECTED]
----- Original Message -----
From: Tony Weeg
To: CF-Talk
Sent: Friday, January 23, 2004 12:28 PM
Subject: regex in a query
hi there.
I have a quick question...
is it possible to use regex in a query?
like I want to find all records in a table that have a field
that matches this string pattern
1x1x-1x1x-1111-111111-x-xx
where 1x combo is any alphanumeric (4), 1111 numeric (4), 111111 numeric
(6), x alpha (1), xx alpha (2)
can I do it in sql, or should I get all records and parse in cf?
thanks.
...tony
tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

