sed error: "parentheses not balanced" - But they are!
I have a list of words, and some of them have parentheses around them like:
" (( hello )) " I'm trying to remove them with sed, but it says that "parentheses not balanced" The sed command is: sed "s/([ ]?\)\)[ ]?)|([ ]?\(\([ ]?)/ /" ... and the exact error is: sed: 1: "s/([ ]?\)\)[ ]?)|([ ]?\ ...": RE error: parentheses not balanced You can see I escape all of the literal parentheses. What am I doing wrong? Thanks. |
try:
sed "s/((\([^)]*\)))/\1/g" |
Ok, that works. Thanks..
|
All times are GMT -5. The time now is 06:17 PM. |