Backtracking is triggered whenever part of the pattern fails to match. You can also explicitly trigger backtracking by calling the fail function within a closure. Table 7-8 shows some metacharacters and built-in rules relevant to backtracking.
Table 7-8. Backtracking controls
Operator
Meaning
:
Don't retry the previous atom; fail to the next earlier atom.
: :
Don't backtrack over this point; fail out of the closest enclosing group ( ( . . . ) , [ . . . ] , or the rule delimiters).
:: :
Don't backtrack over this point; fail out of the current rule or subrule.
<commit>
Don't backtrack over this point; fail out of the entire match (even from within a subrule).
<cut>
Like <commit> , but also cuts the string matched. The current matching position at this point becomes the new beginning of the string.