Extended regular expression engines include "lazy" and "possessive" versions of the quantifiers as alternatives to the default "greedy" ones.
Lazy quantifiers are useful in many cases, and avoid the need for negative lookaheads. Possessive quantifiers provide performance boosts by preventing backtracking, and also allow some strict syntaxes to be specified more concisely.
Extended regular expression engines include "lazy" and "possessive" versions of the quantifiers as alternatives to the default "greedy" ones.
Lazy quantifiers are useful in many cases, and avoid the need for negative lookaheads. Possessive quantifiers provide performance boosts by preventing backtracking, and also allow some strict syntaxes to be specified more concisely.