What exactly does the *+ quantifier do?

quantifiers, regex

Solution

A greedy quantifier matches everything it can and then the pattern backtracks until the match succeeds.

A lazy quantifier forward tracks until the match succeeds.

A possessive quantifier matches everything it can and never backtracks.

The `+` denotes a possessive quantifier. If can be used as, for example, `++` or `*+`.

This ability to prevent backtracking means it can stop catastrophic backtracking.

Problem

The idea of lazy and greedy are easy to understand, but I have only seen/used `*+` once in my regex (in Java) `[A]|[^B]*+(?!C)` (A,B,C are arbitrary values) simply because it worked when the lazy modifier resulted in a StackOverflow error. Because of most search engines' inability to search symbols, I can't find any documentation on this. So what exactly does *+ do and how does it do it?

Original source