Friday, August 2, 2019

Practical use of possessive quantifiers regex

I understand .* (greedy quantifier) backtracks and tries to find a match. and .*+ (possessive quantifier) does not backtrack.



However I have been using .* and .\*? frequently but don't know when to use .*+.



Can somebody give a situation or an example where .*+ should be used?



explanation with an example is appreciated.



EDIT:




i have gone through the theory part and i repeat i understand how it works. i just need one example that matches possessive quantifiers (.*+)

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...