The $1 is merely the "memorized" version of the first
part of the substitution.
If you are having trouble putting quotes in your strings,
that is another problem. Make sure you either escape
them, using backslash, or you declare those strings with
single quotes.
Comment on Re: How do I search and replace a string with quotes