Home | Features | Improve this section
A Subroutine is a pre-defined capture group or named capture group that can be reused in multiple places within the pattern to re-evaluate the subexpression from the group.
SyntaxNOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
(?(DEFINE)…)
— Defines a set of reusable capture groups that can be referenced elsewhere in the pattern.(?n)
— Where n is an integer >= 1. Evaluates the capture group whose offset is n.(?-n)
— Where n is an integer >= 1. Evaluates the capture group whose offset is the nth capture group declared to the left of the current Atom. Example: (?-1)
would revaluate the last declared capture group.(?+n)
— Where n is an integer >= 1. Evaluates the capture group whose offset is the nth capture group declared to the right of the current Atom. Example: (?+1)
would evaluate the next declared capture group.(?&name)
— Evaluates the named capture group with the provided name.(?(DEFINE)
(?<Year>\d{4}|[+-]\d{5,})
(?<Month>0[1-9]|1[0-2])
(?<Day>0[1-9]|2[0-9]|3[01])
)
(?<Date>(?&Year)-(?&Month)-(?&Day)|(?&Year)(?&Month)(?&Day))
Engines
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4