[KongchangAI]
Conceptbacktracking

Backtracking

The mechanism by which a regex engine returns characters one at a time and retries after greedy matching fails; it is the source of catastrophic backtracking (exponential time cost).

Timeline (last 90 days)

Oct 18

Greedy matching means quantifiers by default match as many characters as possible, only backtracking step by step when subsequent matching fails, and this backtracking process is called backtracking.

Unverified50%
Oct 18

Backtracking is the root cause of regex performance problems (catastrophic backtracking, i.e., exponential time consumption).

Unverified50%

All Facts (2)

Source Articles