title: How can I validate regex?
body: <p>I'd like to test the validity of a regular expression in PHP, preferably before it's used. Is the only way to do this actually trying a <code>preg_match()</code> and seeing if it returns <code>FALSE</code>?</p>
  
  <p>Is there a simpler/proper way to test for a valid regular expression?</p>