RegEx standards across languages

One of the oldest sets of standardized regular expressions are the POSIX BRE (basic regular expressions) and ERE (extended regular expressions), documented under Regular Expressions.

Other languages may define their own standards. For example, C++ 2011 has a regular expression library defined in clause 28 (about 46 pages of standard). Perl defines its regular expressions. Other languages borrow from these sources and others. Lex and Flex use their own set of regular expressions. Sed uses its own variant on regular expressions. And Java, JavaScript, and ... define their own versions, sometimes using PCRE (Perl-Compatible Regular Expressions) as the basis for their design. Some of the details are affected by the facilities provided by the language in which the regular expressions are being used.

Jeff Friedl's book Mastering Regular Expressions covers a lot of different sets of regular expressions, identifying what's common and what's different.

Tags:

Regex