[Bug libstdc++/102480] std::regex fails to match ^ when match_prev_avail is used

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 27 11:45:28 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102480

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Actually, I'm not sure what we're supposed to do here.

The ^ anchor matches the start of the input, not the start of a line (except
when using ECMAScript and multiline, but GCC doesn't support multiline yet).

The standard is very unclear what match_prev_avail actually does, but I think
it means that the first character of the input is not actually at the start, so
should not match ^ (except for ECMAScript|multiline cases).

I'm trying to get clarification.


More information about the Gcc-bugs mailing list