Using sed to strip parentheses from a string
I'm trying to use sed (1) to remove parentheses from lines, but only when the parentheses start on a specific line. For example, I want to change a line such as
Song Name (f/ featured artist) (Remix)
Song Name f/ featuredartist (Remix)
. How can I achieve this?
I am currently trying to do the following:
echo "Song Name (f/ featuredartist) (Remix)" | sed s/"(f\/ [a-z]*)"/"f\/ "/
But it all returns
Song Name f/ (Remix)
Also note that anything goes between
, not just
as my working endeavor implied.
source to share