I have a text file that contains the following lines.
Maynard G. Krebs , ss #111−22−3333, the goofy but lovable beatnik in The Many
Loves of Dobie Gillis. None of the show's episodes ever specified Gilligan's
How do i use sed to replace the number #111-22-3333
with xxx-xx-xxxx
?
This is what i have in my sed script:
s/([0-9]{3}-[0-9]{2}-[0-9]{4})/xxx-xx-xxxx/g
I run it with sed -f redact.sed redact.txt