First page Back Continue Last page Overview Graphics
Possessive Quantifiers
Now we can write common forms of this in an easier way by using possessive quantifiers.
A possessive quantifier matches as much as it can and never gives any back.
The notation is to put a plus immediately after the main quantifier.
Thus /(?>X+)/ can be rewritten as /X++/