title: How to insert strings containing slashes with sed?
body: <p>I have a Visual Studio project, which is developed locally. Code files have to be deployed to a remote server. The only problem is the URLs they contain, which are hard-coded.</p>
  <p>The project contains URLs such as <code>?page=one</code>. For the link to be valid on the server, it must be <code>/page/one</code> .</p>
  <p>I've decided to replace all URLs in my code files with sed before deployment, but I'm stuck on slashes.</p>
  <p>I know this is not a pretty solution, but it's simple and would save me a lot of time. The total number of strings I have to replace is fewer than 10. A total number of files which have to be checked is ~30.</p>
  <p>An example describing my situation is below:</p>
  <p>The command I'm using:</p>
  <pre><code>sed -f replace.txt &lt; a.txt &gt; b.txt
  </code></pre>
  <p><code>replace.txt</code> which contains all the strings:</p>
  <pre><code>s/?page=one&amp;/pageone/g
  s/?page=two&amp;/pagetwo/g
  s/?page=three&amp;/pagethree/g
  </code></pre>
  <p><code>a.txt</code>:</p>
  <pre><code>?page=one&amp;
  ?page=two&amp;
  ?page=three&amp;
  </code></pre>
  <p>Content of <code>b.txt</code> after I run my sed command:</p>
  <pre><code>pageone
  pagetwo
  pagethree
  </code></pre>
  <p>What I want <code>b.txt</code> to contain:</p>
  <pre><code>/page/one
  /page/two
  /page/three
  </code></pre>