title: Getting innertext of HTML tags using Regular Expressions
body: <p>I'm having trouble capturing this data:</p>
  
  <pre><code>              &lt;tr&gt;
                  &lt;td&gt;&lt;span class="bodytext"&gt;&lt;b&gt;Contact:&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:Verdana;
    mso-bidi-font-family:Arial'&gt;&lt;b&gt; &lt;/b&gt; 
                        &lt;span class="bodytext"&gt;John Doe&lt;/span&gt; 
                       &lt;/span&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td&gt;&lt;span class="bodytext"&gt;PO Box 2112&lt;/span&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td&gt;&lt;span class="bodytext"&gt;&lt;/span&gt;&lt;/td&gt;
                &lt;/tr&gt;
  
                &lt;!--*********************************************************
  
  
                --&gt;
                &lt;tr&gt;
                  &lt;td&gt;&lt;span class="bodytext"&gt;&lt;/span&gt;&lt;/td&gt;
                &lt;/tr&gt;
  
  
  
                &lt;tr&gt;
                  &lt;td&gt;&lt;span class="bodytext"&gt;JOHAN&lt;/span&gt; NSW 9700&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td&gt;&lt;strong&gt;Phone:&lt;/strong&gt; 
                  02 9999 9999
                      &lt;/td&gt;
                &lt;/tr&gt;
  </code></pre>
  
  <p>Basically, I want to grab everything after "Contact:" and before "Phone:" minus the HTML; however these two designations may not always exist so I need to really grab everything between the two colons (:) that isn't located inside a HTML tag.
  The number of <code>&lt;span class="bodytext"&gt;***data***&lt;/span&gt;</code> may actually vary so I need some sort of loop for matching these.</p>
  
  <p>I prefer to use regular expressions as I <em>could</em> probably do this using loops and string matches.</p>
  
  <p>Also, I'd like to know the syntax for non-matching groups in PHP regex.</p>
  
  <p>Any help would be greatly appreciated!</p>