In Perl’s regex flavor, and compatible flavors, you can use a special construct to create conditional if-then-else regular expressions.| www.regular-expressions.info
PCRE2 (Perl Compatible Regular Expressions v2) is an open source library written in C that allows developers to add regular expression support to their applications. The library is compatible with a great number of C compilers and operating systems.| www.regular-expressions.info