title: How to split unregular strings in Powershell?
body: <p>I have some big logs/dumps with SOAP (1line without wrapping). 
  For first I done some simple Select-string like that:</p>
  
  <pre><code>$where = "D:\log\Test\"
  $what = Get-ChildItem $where -Filter "*.txt"
  $regex= "(?=&lt;\?xml).*(Envelope&gt;)"
  $Path="d:\Log\"
  $Result = "D:\Log\wynik2.log"
  $string = select-string -Path $what -Pattern $regex
  $string
  </code></pre>
  
  <p>Result is like:</p>
  
  <pre><code>D:\log\Test\test1.txt:1:g .vI.Y....(A..P.......&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;some text1&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
  D:\log\Test\test1.txt:2:g .vJ.YiB..(...P....R..&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;some text2&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
      ...
  D:\log\Test\test1.txt:4000:g .vL.Yb...'...P.......&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;some text2&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>How can I drop everything what is not part of my SOAP (example: D:\log\Test\test1.txt:4000:g .vL.Yb...'...P.......) </p>