title: Powershell parenthesis in pattern
body: <p>I need to search for a pattern in a file and change the value of the version. Here's the pattern :</p>
  
  <pre><code>[file: FileVersion("1.2.3.$VAR$")]
  </code></pre>
  
  <p>In my Powershell script, I have a variable with the Pattern inside :</p>
  
  <pre><code>$FileVersionPattern   = '[file: FileVersion("[0-9]*.[0-9]*.[0-9]*.$VAR$")]'
  </code></pre>
  
  <hr>
  
  <pre><code>(Get-Content "$filePath")    -replace($FileVersionPattern, ('[file: FileVersion("' + $Major + '.' + $Minor + '.' + $Release + '.$VAR$")]'))   | Set-Content  "$filePath"
  </code></pre>
  
  <p>So the return should be <code>($Major = 5 $Minor = 5 $Release = 5)</code> : </p>
  
  <pre><code>[file: FileVersion("5.5.5.$VAR$")]
  </code></pre>
  
  <p>It seems that the <code>$VAR$</code> and the parenthesis is causing my script to fail. </p>