title: Regular expression invalid when replacing in powershell
body: <pre><code>$100 = &quot;$env:APPDATA/somthing&quot;
  $iamhere = &quot;C:/example&quot;
  $100 = $100 -replace &quot;`$env:APPDATA\somthing&quot;, &quot;$iamhere&quot; 
  </code></pre>
  <p>I want <code>$100</code> replaced by <code>$iamhere</code> of its contents (in text form) although I get this error.</p>
  <pre class="lang-none prettyprint-override"><code>Regular expression pattern is not valid: $env:APPDATA\somthing.
  At line:1 char:1
  $100 = $100 -replace &quot;`$env:APPDATA\somthing&quot;, &quot;$iamhere&quot;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : InvalidOperation: ($env:APPDATA\somthing:String) [], RuntimeException
     + FullyQualifiedErrorId : InvalidRegularExpression
  </code></pre>
  <p>I think this is because I am trying to replace some text with a directory, but I want the text inside the variable of <code>$iamhere</code></p>