title: Compiling multiple regexes with labels in node.js similar to how it can be done in python
body: <p>In python you can compile multiple regexes with labels into a single regex. The user can apply one regex and it returns the label along with other information (and should be more efficient than applying each regex separately).  Is there an equivalent capability in javascript or node.js?  Provide an example please.</p>
  
  <p>As an example case.  You have a regex for phone numbers, one for dates and one for IP addresses.  The 3 regexes are compiled into one with associated labels (phone number, date, IP address).  When the regex is applied, it returns the label along with other standard regex information.</p>
  
  <p>Thanks</p>