regex lib: non-greedy repeats w/ match_posix

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". Ralph

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.
participants (2)
-
Benzinger, Ralph
-
John Maddock