Single quotes become ordinary characters when inside double-quotes. So you can do this:
echo "that's OK"
and this is not an error or open-quote. So putting single-quotes inside a quoted
sed-expression is OK, but is does not quote the text between them.
The code above by Jean-Pierre looks OK to me.