title: Powershell -match "Cannot index into a null array"
body: <p>I have an <code>xml</code> file, ignore the numbers at the start, that's not part of it.</p>
  
  <pre><code>(1)&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  (2)&lt;one&gt;
  (3)&lt;x&gt; &lt;/x&gt;
  (4)&lt;/one&gt;&lt;look&gt; HERE &lt;/look&gt; &lt;find&gt; 123 &lt;/find&gt; &lt;some&gt; &lt;/some&gt;
  (5)&lt;two&gt;&lt;/two&gt;
  </code></pre>
  
  <p>I <strong>know</strong> there is a line that has a <code>&lt;look&gt; HERE &lt;/look&gt;</code> tag, and I want to be able to find the value located within the <code>&lt;find&gt;</code> tags (in this case <code>123</code>), which is on the same line.</p>
  
  <pre><code>Get-Content '.\x.xml' # works
  
  $line = $x -match "&lt;look&gt; HERE &lt;/look&gt;" # this returns the entire line (line 4 in this case)
  
  $line -match "&lt;find&gt;(?&lt;content&gt;.*)&lt;/find&gt;"
  
  $matches['content'] #cannot index into a null array error
  </code></pre>
  
  <p>Why? I expect to get <code>123</code> returned</p>