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.
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.
Thanks