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.