Uczę się wyrażen regularnych stąd :https://docs.oracle.com/javase/tutorial/essential/regex/quant.html
I jest tam podany taki przykład(tutaj wrzucam efekt działania programu):
Enter your regex: .*foo // greedy quantifier
Enter input string to search: xfooxxxxxxfoo
I found the text "xfooxxxxxxfoo" starting at index 0 and ending at index 13.
Enter your regex: .*?foo // reluctant quantifier
Enter input string to search: xfooxxxxxxfoo
I found the text "xfoo" starting at index 0 and ending at index 4.
I found the text "xxxxxxfoo" starting at index 4 and ending at index 13.
Enter your regex: .*+foo // possessive quantifier
Enter input string to search: xfooxxxxxxfoo
No match found.
I jak rozumiem chciwy kwantyfikator ( greedy quantifier) znajduje mi ostatnie dopasowanie pasujące do wzorca,
niechętny(reluctant quantifier) znajdue wszystkie dopasowania do wzorca. Natomiast nie rozumiem jak działa zaborczy kwantyfikator(possessive quantifier). W przypadku z góry pokazuje że No match found, a ja sądziłem że powinien jakieś dopasowanie znaleźć. Mógłby mi ktoś napisać dlaczego tak się nie dzieje w tym przypadku?