Thread: regEx replace
View Single Post
  #16   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 12:36:47 -0700 schrieb Robert Crandal:

Do you know how to fix the pattern so it precisely
only matches this format: (123)456-7890?


str = "Call me at (123)456-7890"

ptrn = "\(\d{3}\)\d{3}-\d{4}"


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