How to escape double quotes in sed

A recent attempt to replace a string within double quotes “string value” while using sed resulted in much trial and error. A quick Internet search revealed a working answer.  It is here for my reference.

I wanted to replace “this value” with “that one” in a file, we’ll call testfile.  According to multiple sources, the sed command allows the use of other characters instead of /.

sed 's#"this value"#"that one"#g' testfile

This also works.

sed 's/\"this value\"/\"that one\"/g' testfile

Usually the man pages are useful, but for sed, the info pages are more informative.  Below is the relevant selection for this article around line 107.

info sed
sed-info

Source(s)
http://stackoverflow.com/questions/7517632/how-do-i-escape-double-and-single-quotes-in-sed-bash
http://www.commandlinefu.com/commands/view/2889/sed-using-colons-as-separators-instead-of-forward-slashes