You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to Section 9.3.6 of the POSIX standard, back-references to unmatched capture groups ("subexpressions") should not match. However, MSVC STL's implementation currently matches such back-references to the empty string.
Note that the equivalent ECMAScript regex (.)*\1 does match the empty string, since the standard says that back-references to unmatched capture groups match the empty string.
The text was updated successfully, but these errors were encountered:
Describe the bug
According to Section 9.3.6 of the POSIX standard, back-references to unmatched capture groups ("subexpressions") should not match. However, MSVC STL's implementation currently matches such back-references to the empty string.
Test case
https://godbolt.org/z/83nxo39qj
Expected behavior
The regular expression should not match.
Additional context
Note that the equivalent ECMAScript regex
(.)*\1
does match the empty string, since the standard says that back-references to unmatched capture groups match the empty string.The text was updated successfully, but these errors were encountered: