Hi,

I would like to replace a a set of words by another word via sed. My
first try was:

  echo "a cat or a dog" | sed 's/\(cat\)\|\(dog\)/PET/g'

I also tried some variations of this. But all failed.

For any help I would be very happy.

Cheers,
Toby

P.S. some variations of the search pattern
\(cat|dog\)
\(\(cat\)\|\(dog\)\)

Reply via email to