title: Powershell - copy matching strings to a new file using "|" as the separator
body: <p>I have been trying to write a script which reads through a given file and copies anything in front of "value1: " and "value2" to a new text file. The format bellow if a very similar example. </p>
  
  <p>Input file:</p>
  
  <blockquote>
    <p>20/01/2016 00:00:18    Hsjdjskjlsadnfjk 
    <br>20/01/2016 00:00:18    Value1: /test/OLD/myfiles/
    <br>20/01/2016 00:00:18    Value2: /test2/NEW/currentfiles/
    <br>20/01/2016 00:00:19    kjshfjksfdkls
    <br>20/01/2016 00:00:19    Hdjdjndlkasjdflk
    <br>20/01/2016 00:00:19    Value1: /match/2015/pages/
    <br>20/01/2016 00:00:20    Value2: /replace/2016/pages/
    <br>20/01/2016 00:00:20    Jdjddn klsndfk</p>
  </blockquote>
  
  <p>Expected output:</p>
  
  <pre><code>/test/OLD/myfiles/|/test2/NEW/currentfiles/|
  /match/2015/pages/|/replace/2016/page/|
  </code></pre>
  
  <p>(Pipe as the separator) </p>