Assume I want to put all occurances of "ha" or "boowa" inside ::. so input "ha" gives output ":ha:".
I could do the following.
sed 's/\(ha\)/:\1:/g' test
sed 's/\(boowa\)/:\1:/g' test
But I want to use logical or and do it in 1 line of code.
sed 's/\(ha\) LOGICAL OR \(boowa\)/:\1: LOGICAL OR :\2:/g' test
Is there anyway to do that? The  only only matches characters and not a string.