Closed jgm closed 3 years ago
Simpler explanation: The recursive syntax is simple. In PCRE and Perl, you just add (?R) anywhere you like in your pattern. Basically, (?R) means "paste the entire regular expression right here, replacing the original (?R). https://www.rexegg.com/regex-recursion.html
This is only used in scheme.xml.
This is used in scheme.xml. From pcre documentation:
(?R)
or(?0)
: Recursive subpattern. Treat the contents of a given capture buffer in the current pattern as an independent subpattern and attempt to match it at the current position in the string. Information about capture state from the caller for things like backreferences is available to the subpattern, but capture buffers set by the subpattern are not visible to the caller.