title: Powershell: Find and replace words split by newline
body: <p>So I have a text file that looks something like this:</p>
  
  <pre><code>Members : {USER\member1, USER\member2, US
             ER\member3, USER\member4, USER
             \member5, USER\member6}
  </code></pre>
  
  <p>and I would like to remove <code>USER\</code>. The following code removes it but not when it's split by a newline, for example when <code>US</code> on one line and <code>ER\</code> on another line.</p>
  
  <pre><code>Foreach-Object { %{$_.Replace('USER\', '') }
  </code></pre>
  
  <p>Putting <code>`n or `r</code> in there doesn't work. Any help is appreciated.</p>