sed: unterminated 's' command`
<p>I'm writing a nice regex to replace some IP's in a text file. </p>

<pre><code>sed -r "s/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/${APP_IP}/g" /path/to/my/file
</code></pre>

<p>However it is giving: <code>sed: -e expression #1, char 49: unterminated 's' command</code></p>

<p>I need the double quotes otherwise it replaces desired strings with the literal variable name: ${APP_IP}</p>

<p>What am I missing?</p>