title: Finding a term inside a <title> bracket in html
body: <p>I am trying to find a specific string that contains a keyword inside a title tag in html e.g.</p>
  
  <pre><code>&lt;title&gt;Bla bla bla String bla bla&lt;/title&gt;
  </code></pre>
  
  <p>I am unsure how to construct that beyond the starting:</p>
  
  <pre><code>\&lt;title\&gt;(Word Keyword)\&lt;\/title\&gt;
  </code></pre>
  
  <p>I also want to make sure if I use any wildcards regex may be able to use that the wildcard between the keyword and the  doesn't inadvertently go all the way to the end of perhaps another title block in the html.</p>
  
  <p>Lastly I'm trying to find a way to then<br></p>
  
  <ul>
  <li>extract the Word Keyword only even though I've capture the entire regex</li>
  <li>extract/keep the  separately.</li>
  </ul>
  
  <p>This is because I'll have several types of  to captiure from and I want to extract both the 'Word Keyword' and the tag name it came from. Is this possible? I've looked into named groups but not sure if/how to extract after e.g.</p>
  
  <pre><code>(?P&lt;TAG&gt;(\&lt;title\&gt;|\&lt;head\&gt;)(?P&lt;TERM&gt;(Word Keyword))\&lt;\/title\&gt;
  </code></pre>
  
  <p>Naturally with any wildcard code as needed to make the above work but assuming it does I'd then want to be able to extract, after matching the string:</p>
  
  <ul>
  <li>title</li>
  <li>Bla Keyword</li>
  </ul>
  
  <p>or</p>
  
  <ul>
  <li>head</li>
  <li>Yada Keyword</li>
  </ul>