title: Javascript Regex: Validate phone number
body: <p>I want to validate a 11 digit phone number that must start with 09 (i.e. 09123456789) using javascript for client side check.</p>
  
  <p>this is my code:</p>
  
  <pre><code>function validatePhone(number) {
      var re = /^09[0-9]{9}$/;
      return re.test(number);
  }
  </code></pre>
  
  <p>It worked correctly as far as I know at first but now it return invalid for any number I use.  Does anyone know what is wrong with my code?
  By the way as I'm using jQuery, if there is a better way with jquery that would be much better.</p>