regEx replace
"Claus Busch" wrote:
str = "Call me at (123)456-7890"
ptrn = "\(\d{3}\)\d{3}-\d{4}"
That one didn't work. The output was
"Call me at *"
Oh, the pattern for the SSN didn't work
either: ptrn = "\b[0-9]{3}-[0-9]{2}-[0-9]{4}\b"
It replaces the entire SSN with a single "*" char.
|