title: Regular expression Getting HTML Doctype
body: <p>My Html code is like this </p>
  
  <p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</code></p>
  
  <p>or this can be like this </p>
  
  <p><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;</code></p>
  
  <p>I want to get the <code>Doc Type</code>  which will be like <code>"XHTML 1.0 Strict"</code> (for the first one), and <code>"HTML 4.0"</code> (for the second one) from it. What will be the regular expression code for this?
  I like to use it in <code>PHP preg_match()</code> function.</p>
  
  <p>Please help me in this case.</p>