title: Powershell extract string start with
body: <p>I have a txt file with following content:</p>
  
  <pre><code>testdemo | 5 | 4563456| OMNI | retailomni
  testRetail | 142 | 3453456345| testRetai111l | test
  testtesttest | 44 | 4564356| apl | APL
  </code></pre>
  
  <p>I need to select whole string, that starts from "testdemo". How this can be done in PS?</p>
  
  <pre><code>$operator = "testdemo"
  $operatorcontent = Get-Content operators.txt | "Need to get whole string, starts from $operator"    
  </code></pre>