Perl-Compatible [Regular Expression]s. A superset of Regular Expressions with a few extra features introduced by [Perl], less a couple of features that could not be enforced without [Perl] itself. Welcomed by many, hated by many others. http://www.pcre.org/ Note that, in spite of the name, PCRE do not exist in [Perl] only. Other programs and/or languages can implement them, like [PHP]. [Tcl] uses [ARE]. ---- [JMN] 2023 For me - the most notable missing feature in Tcl's regex engine is the \p feature for Unicode Properties, Scripts and Blocks. e.g it allows \p{Sc} or \p{Currency_Symbol} which is aware that not all such symbols are in the Unicode Currency_Symbols block. You can also do things like: \p{InHiragana} The equivalent with Tcl's engine would be something like: regexp {[\u3040–\u309F]} $somechar There are many more regexes that do more than just look at a single character range e.g testing whether a character is a letter in any language and/or a particular case. Some of them can be converted to a simple case such as the Hiragana one above but to do this all properly it would ideally be maintained in the RE engine or some loadable package. ---- ---- [DKF] - Wow. There's more Features from the Black Lagoon in there than you can shake a B-Movie at... ---- A big Regular Expression fan sees [DKF]'s remark and says: ''Maybe [Tcl] uses [ARE] because [Tcl] is so merciful. More features for the bold and less features for the queasy''. Another (OK, the same) big Regular Expression fan also says: ''Regular Expressions are not very easy, granted, but they're also overly mystified, and PCRE take the blame for some extra mystification, even by those who are good friends with Regular Expressions.'' The thing is that PCRE allow tricks that are impossible with traditional [RE]. Some people advocate avoiding PCRE completely and, instead, writing even more complex, long-winded, probably convoluted code to replace them. Big Regular Expression Fan will never understand these people. ---- Here is a very quick summary of PCRE's most relevant features. Items marked with + are supported by [ARE] (thank God). + foo(?=bar) match "foo" only if "bar" follows it + foo(?!bar) match "foo" only if "bar" does NOT follow it (?<=foo)bar match "bar" only if "foo" precedes it (?> Category Glossary | Category String Processing | regular expression