title: Powershell regex replace line that contains ONLY certain characters
body: <p>I read a file with get-content <strong>-raw</strong> because of other operations I perform. </p>
  
  <pre><code>$c = get-content myfile.txt -raw
  </code></pre>
  
  <p>I want to replace the entirety of each line that contains ONLY the characters "*" or "=" with "hare"</p>
  
  <p>I try</p>
  
  <pre><code>$c -replace "^[*=]*$","hare"
  </code></pre>
  
  <p>but that does not succeed.  It works with simple string input but not with my string that contains CRLFs.  (Other regex replace operations not involving character classes work fine.)</p>
  
  <p>TEST:
  given an input file of two lines</p>
  
  <pre><code>*=** 
  keep this line ***
  ***=
  </code></pre>
  
  <p>The output should be </p>
  
  <pre><code>hare
  keep this line ***
  hare
  </code></pre>
  
  <p>Tried many things, no luck. </p>