title: Find/replace string with carriage return and line feed in PowerShell
body: <p>Is there a way to have PowerShell find and replace a string (for example <strong>~}}|{{E</strong>) with a carriage return and line feed (<strong>\r\nE</strong>)?</p>
  
  <p>For example:</p>
  
  <pre><code>$filenames = @("E:\blergfest.csv")
  foreach ($file in $filenames) {
      $outfile = "$file" + ".out"
  
      Get-Content $file | Foreach-object {
          $_ -replace '\~}}|{{E', '\r\nE' `
              -replace '\|\r\n', '\r\n'
      } | Set-Content $outfile
  }
  </code></pre>