-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.regexIssues related to regexIssues related to regex
Description
> /(a?)+/.exec("aaa")
Array [ "aaa", "a" ]
> /((b)?(be)?)+bbee/.exec("bbebbee")
Array(4) [ "bbebbee", "bbe", "b", "be" ]
~Firefox
But in libc++, the equivalent operations return [ "aaa", "" ]
and [ "bbebbee", "", undefined, undefined ]
.
Full example: https://godbolt.org/z/zYYenvEdb (blatantly modified from microsoft/STL#5365)
Bug also exists in libstdc++ and ms-stl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120212
microsoft/STL#5490
Metadata
Metadata
Assignees
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.regexIssues related to regexIssues related to regex