title: Java Regex - Phone number validation
body: <p>I am new to <strong>java regex</strong>. I have to validate the telephone phone numbers using java regex.
  I have tried some combinations, this being the best result so far: </p>
  
  <pre><code>^\s*(?:\+?(011))?[-. (]*?(1|32)?[-. (]*(703|701|21)?[-. )]*(\d{3})?[-. ]*(\d{4})?\s*$ 
  </code></pre>
  
  <p>Acceptable inputs:</p>
  
  <pre><code> 1.  ####
   2.  (###)###-#### 
   3.  ###-####
   4. +#(###)###-####
   5.  #####.#####
  </code></pre>
  
  <p>Unacceptable inputs:
  </p>
  
  <pre><code> 1. ###
   2. #/###/###/####
   3. nr ###-###-####
   4. ##########
   5. (###) ###-####
  </code></pre>
  
  <p>where # highlights numbers/digits</p>
  
  <p>Thanks in advance.</p>