title: What is the regex pattern for datetime (2008-09-01 12:35:45 )?
body: <p>What is the RegEx pattern for DateTime (2008-09-01 12:35:45 ) ?</p>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>No ending delimiter '^' found</p>
  </blockquote>
  
  <p>Using:</p>
  
  <pre><code>preg_match('(?n:^(?=\d)((?&lt;day&gt;31(?!(.0?[2469]|11))|30(?!.0?2)|29(?(.0?2)(?=.{3,4}(1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|0?[1-9]|1\d|2[0-8])(?&lt;sep&gt;[/.-])(?&lt;month&gt;0?[1-9]|1[012])\2(?&lt;year&gt;(1[6-9]|[2-9]\d)\d{2})(?:(?=\x20\d)\x20|$))?(?&lt;time&gt;((0?[1-9]|1[012])(:[0-5]\d){0,2}(?i:\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$)', '2008-09-01 12:35:45');
  </code></pre>
  
  <p>Gives this error: </p>
  
  <blockquote>
    <p>Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 0 in E:\www\index.php on line 19</p>
  </blockquote>