Thread: regEx replace
View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_3_] Robert Crandal[_3_] is offline
external usenet poster
 
Posts: 161
Default regEx replace

"Claus Busch" wrote:

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


Awesome! You got it!

Also, remember the previous phone number problem?
The pattern was "\(|\)|-|!|\d", but that erases abnormal
phone numbers such as (555)555-12345678900000.

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