a flexible alternative approach to look-behind assertions because the discarded part of the match (the part that precedes \K) need not be fixed in length. Escape sequences for zero-width assertions E.g. \b for matching zero-width "word boundaries", similar to (?<=\W)(?=\w)|(?<=\w)(?=\W)|^|$. Comments A comment begins with (?# and ends at the next closing parenthesis. Recursive patterns A pattern can refer back to itself recursively or to any subpattern. For example, the pattern \((a*|(?R))*\) will match any combination of balanced parentheses and "a"s. Generic callouts PCRE expressions can embed (?Cn), where n is some number. This will call out to an external user-defined function through the PCRE API and can be used to embed arbitrary code in a pattern. Differences from Perl Differences between PCRE2 and Perl (as of Perl 5.9.4) include but are not limited to: Until release 10.30 recursive matches were atomic in PCRE and non atomic in Perl This meant that "<<!>!>!>><>>!>!>!>" =~ /^(<(?:[^<>]+|(?3)|(?1))*>)()(!>!>!>)$/ would match in Perl but not in PCRE2 until release 10.30. The value of a capture buffer deriving from the ? quantifier (match 1 or 0 times) when nested in another quantified capture buffer is different In Perl "aba" =~ /^(a(b)?)+$/; will result in $1 containing "a" and $2 containing undef, but in PCRE will result in $2 containing "b". PCRE allows named capture buffers to be given numeric names; Perl requires the name to follow the rule of barewords This means that \g{} is unambiguous in Perl, but potentially ambiguous in PCRE. This is no longer a difference since PCRE 8.34 (released on 2013-12-15), which no longer allows group names to start with a digit. PCRE allows alternatives within lookbehind to be different lengths Within lookbehind assertions, both PCRE and Perl require fixed-length patterns. That is, both PCRE and Perl disallow variable-length patterns using quantifiers within lookbehind assertions. However, Perl requires all alternative branches of a lookbehind assertion to be the same length as each other, whereas PCRE allows those alternative branches to have different lengths from each other as long as each branch still has a fixed length. PCRE does not support certain "experimental" Perl constructs Such as (??{...}) (a callback whose return is evaluated as being part of the pattern) nor the (?{}) construct, although the latter can be emulated using (?Cn). Recursion control verbs added in the Perl 5.9.x series are also not supported. Support for experimental backtracking control verbs (added