title: how to check entered regex pattern and example are correct or not
body: <p>I have two textbox in my form. First for regex pattern, and second is for input text.</p>
  
  <p>I am try to check enter regex pattern and entered text matches or not.</p>
  
  <p>This is <a href="http://jsfiddle.net/NxFCg/1/" rel="nofollow">my simple attempt</a>.</p>
  
  <p>And this is working demo:</p>
  
  <pre><code>'01-01-2012'.match( /\d{2}-\d{2}-\d{4}/ )
  </code></pre>
  
  <p><a href="http://jsfiddle.net/NxFCg/3/" rel="nofollow">Fiddle</a></p>
  
  <p>Any solution for my query?</p>