Feature: Backtracking Control Verbs
Home | Features | Improve this section
A Backtracking Control Verb is a special pattern usually in the form of
(*VERB:arg) that performs some special behavior with respect to backtracking.
Improve this section
NOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
(*PRUNE:name)— Prunes the backtracking tree.
(*SKIP:name)— Prunes the backtracking tree and preceding text cannot be part of any match of the pattern.
(*:name)— Marks a point in the string where a certain part of the pattern has been matched.
(*THEN:name)— When backtracked into on failure causes the engine to attempt the next alternative in the innermost enclosing group with alternatives.
(*COMMIT:arg)— When backtracked into on failure causes the match to fail outright.
(*FAIL:arg)— Matches nothing and always fails. Equivalent to
(*ACCEPT:arg)— Causes the end of successful matching at the point where the verb was encountered.