
8 Apr
2004
8 Apr
'04
12:41 p.m.
I noticed that the newest regex version no longer supports non-greedy repeats "+?" in match_posix mode. What was the rationale for >this? Is it possible to re-enable non-greedy repeats? As far as I could test, it's not sufficient to modify the syntax check around >regex_compile.hpp:1794; regex "a+?" would be valid but matches "aaa" on string "-aaa-" instead of "a".
It is deliberate, non-greedy repeats don't really fit into the POSIX matching philosophy, where repeats are neither greedy not non-greedy, rather it's parenthesis that determine what the best match is. John.