First page Back Continue Last page Overview Graphics
Pattern Recursion in more detail
Pattern recursion allows us to treat the contents of a particular pattern buffer as an independent subexpression
(?1) recurses into the first capture buffer in the pattern
(?R) and its alias (?0) allows us to treat the entire pattern as an independent subexpression
If we have named a buffer we can also recurse into it by name by using (?&NAME)
This is useful for writing grammars...