regex - Replace a double backslash followed by quote (\\') using sed? -
i unable replace double backslash followed quote \\'
in sed. current command
echo file.txt | sed "s:\\\\':\\':g"
the above command not replaces \\'
\'
replaces \'
'
how replace exact match?
input:
'one', 'two \\'change', 'three \'unchanged'
expected:
'one', 'two \'change', 'three \'unchanged'
actual:
'one', 'two \'change', 'three 'unchanged'
$ sed "s/\\\\\\\'/\\\'/g" file 'one', 'two \'change', 'three \'unchanged'
Comments
Post a Comment