title: How to get title tag in a string of html?
body: <p>Hey i'm loading an html page using ajax into a string, now i want to find the title of the page and use it.</p>
  
  <p>Now i did manage to get the <code>&lt;title&gt;</code> using regex but that returns the tag along with the title itself and i wish to extract that from the string or could there be a way to do that in the regex?</p>
  
  <p>This is my code :</p>
  
  <pre><code>var title = result.match(/&lt;title[^&gt;]*&gt;([^&lt;]+)&lt;\/title&gt;/);
  </code></pre>
  
  <p>Now how do i get the actuall title after this/ instead of this?</p>