title: How to interpolate variables in regular expressions in powershell
body: <p>I'm trying to see if there is an entry for some input in a file, so I'm using a regular expression to query each line:</p>
  
  <p><Code>cat $file | where {$_ -match "^script\$fileName -*"}</Code></p>
  
  <p>where $fileName is some input defined elsewhere.</p>
  
  <p>How do I alter the regex to interpolate the variable instead of matching for '$fileName' ?</p>