title: Regular Expression to validate multiple condition
body: <p>I require to validate a string using javascript with multiple conditions. I am not sure how to do this using regular expressions.</p>
  
  <p>I need to check if the string does not contain any of the following conditions</p>
  
  <p><strong>Condition 1</strong>: String of any length beginning with 18XX or 1-8XX or 8XX, where X is any number from 0 to 9 (both 0 and 9 being inclusive). <strong><em>Ex: 1800abc, 812abc-def, 1-805-999-9999</em></strong> </p>
  
  <p><strong>Condition 2</strong>: The string beginning with NXX or 1NXX or 1-NXX followed by exactly seven numbers not including hyphens, where N is any number from 2 to 9 (both 2 and 9 being inclusive) and X is any number from 0 to 9 (both 0 and 9 being inclusive). <strong><em>Ex: 12-999-9999, 19009998888, 1-212---1-2-3-4-5-6-7--</em></strong></p>
  
  <p><strong>Condition 3</strong>: The string beginning with XXXXX, where X is any number from 0 to 9 (both 0 and 9 being inclusive). <strong><em>Ex: 20176, 90210-Melrose</em></strong></p>