First page Back Continue Last page Overview Graphics
Backtracking Control Verbs
(*COMMIT)
- When backtracked into causes the pattern to fail outright. The engine will not try to match the pattern at any other start point.
- In Perl6 this is called... <commit>
- 'foofoofoobar' =~ / (fo+)* (*COMMIT) [BC]ar /x;
- will fail, and will do so quickly.
- 'foofoofoobar' =~ / (fo+)* [BC]ar /x;
- won't, although it could be worse as the super-linear cache kicks in. (see commit.pl)