Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 regular expression help

Author  Topic 

chedderslam
Posting Yak Master

223 Posts

Posted - 2009-08-11 : 16:06:16
I am trying to use a regular expression in a select without much success. Any help? RE is in quotes.

select address_1
from address
where address_1 like '(p|p[., ]+)(o|o[., ]+)box'

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-08-11 : 16:09:43
WHERE Address_1 LIKE '%pobox%'
OR Address_1 LIKE '%p[., ]obox%'
OR Address_1 LIKE '%po[., ]box%'
OR Address_1 LIKE '%p[., ]o[., ]box%'



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -