title: How to escape certain characters for sed?
body: <p>I want to remove a line from a file and understand this can be done with sed.</p>
  <p>The command below fails because of <strong>unterminated address regex</strong></p>
  <pre><code>sed -i '/$settings['file_temp_path'] = '../tmp';/d' file.php
  </code></pre>
  <p>Having read the the answer at <a href="https://stackoverflow.com/questions/27729772/unterminated-address-regex-while-using-sed">unterminated address regex while using sed</a> . I now understand this is because characters [ and / must be escaped.</p>
  <p>Having tried this, the code below is still unsuccessful</p>
  <pre><code>sed -i '/$settings\['file_temp_path'] = '..\/tmp';/d' file.php
  </code></pre>
  <p>What is wrong with this? What am I missing?</p>