Using GNU sed, I need to remove parenthetical phrases like (click here ....) including the parens. The text following click here varies, but I need to remove the whole outer parentheses.
I’ve tried many variations on the following, but I can’t seem to hit the right one:
sed -e 's/\((click here.*[^)]*\)//'
EDIT Foolishly I didn’t notice that there’s often actually a linebreak in the middle of the parenthetical string, so sed probably isn’t going to work. Example:
(click here to
enter some text)
With perl you can run :
It will read the inputfile in a string then replace all occurrences of
(click here anychar but '(' )then output all in the outputfile.