title: sed and Applescript shell script - strip character string
body: <p>I'm trying to use sed in a shell script in Applescript to strip this string - ?print=1 - from this html link in the variable the_html, which is <code>&lt;a href="http://myurl.com.html?print=1"&gt;my link&lt;/a&gt;</code></p>
  
  <p>but this throws an error:</p>
  
  <pre><code>set new_html to do shell script "echo " &amp; quoted form of the_html &amp; " | sed s=?print=1= =g'"
  </code></pre>
  
  <p>Do I need to escape the "="?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Works now. Applescript didn't like an = escaped with a <code>\</code>, but escaping the whole string works:</p>
  
  <pre><code>sed 's/?print=1//g'
  </code></pre>