title: UAE Phone number regular expression
body: <p>I am building a regular expression for UAE numbers. I managed to run few cases but some how its not validating all.</p>
  
  <p>Here is what I came up with.</p>
  
  <p>To Validate numbers starting with: 00971 or +971 below expression works fine.</p>
  
  <pre><code>/^((\+971|00971){1}(2|3|4|6|7|9|50|51|52|55|56){1}([0-9]{7}))$/
  </code></pre>
  
  <p>e.g. <code>00971551234567</code></p>
  
  <p>Now to validate numbers starting without <code>00971</code> or <code>+971</code>, I combined below expression with above:</p>
  
  <pre><code>/^((050|051|052|055|056){1}([0-9]{7}))$/
  </code></pre>
  
  <p>e.g. <code>0551234567</code></p>
  
  <h2>The Problem</h2>
  
  <p>Somehow below expression is not working to validate phone numbers like 041234567</p>
  
  <pre><code>/^((02|03|04|06|07|09){1}([0-9]{7}))$/
  </code></pre>
  
  <p>I tried combining all of expression in one expression but it wasn't working, then I realized only above expression wasn't working.</p>
  
  <pre><code>         [Country][area][7 digit number]
  Pattern: +971 55 1234567
  </code></pre>
  
  <p>Expression should accept numbers like:</p>
  
  <ul>
  <li><code>00971551234567</code></li>
  <li><code>+971551234567</code></li>
  <li><code>+97141234567</code></li>
  <li><code>0551234567</code></li>
  <li><code>041234567</code></li>
  </ul>
  
  <p>How can I make my regex work?</p>