Regex101 link: https://regex101.com/r/MsZy0A/2
I have the following regex pattern; .++b
with the following test data; aaaaaaaacaeb
.
What I don't understand is the "Possessive quantifier". I've read that it doesn't backtrack, which it normally does. However, I don't think it has to backtrack anyways? It only has to match anything up to and including "b", "b" would be matched twice, as .+
matches everything (including "b"), and the "b" after would also match "b".
Could someone please explain the possessive quantifier's role in this?
This question is not a duplicate of the one noted, I'm asking about this particular case because I still didn't get it after reading the other answer.