title: Looking to remove text from text file using powershell
body: <p>I'm trying to edit a large <strong>plain text</strong> document containing various html elements such as the following:</p>
  
  <ul>
  <li><code>&lt;p&gt; &amp; &lt;/p&gt;</code></li>
  <li><code>&lt;script&gt; &amp; &lt;/script&gt;</code></li>
  <li><code>&lt;style&gt; &amp; &lt;/style&gt;</code></li>
  <li><code>&lt;div&gt; &amp; &lt;/div&gt;</code></li>
  <li>And in more extreme cases; <code>&lt;span style="color: #ff0000;"&gt; &amp; &lt;/span&gt;</code></li>
  </ul>
  
  <p>My goal is to remove any <code>&lt;UniqueText&gt;</code> from a text file. I've not worked with powershell much so my knowledge is limited, none less, I gave it a shot.</p>
  
  <p>For replacing all <code>&lt;UniqueText&gt;</code></p>
  
  <pre><code>get-content "C:\Users\John\Desktop\input.txt" | -replace "\&lt;.*?\&gt;","" | Out-File C:\Users\John\Desktop\output.txt
  </code></pre>
  
  <p>The above script gives the following error:</p>
  
  <blockquote>
    <p>-replace : The term '-replace' is not recognized as the name of a cmdlet, function, script file, or operable program.</p>
  </blockquote>