Thread: regEx replace
View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default regEx replace

Hi Robert,

Am Thu, 2 Apr 2015 10:53:03 -0700 schrieb Robert Crandal:

str = "My SSN's are 123-45-6789 or 13434344-34-13300012664"


try:
ptrn = "\b[0-9]{3}-[0-9]{2}-[0-9]{4}\b"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional