Skip to main content
5 votes
Accepted

sed: why my regex does not work correctly

[^\"] means “any character except \ and "”; so nothing ends up replaced. You’ll get the result you’re after if you remove the backslash from the bracket expression: sed -e 's/\"\([^&...
Stephen Kitt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible