Issue |
133314
|
Summary |
[libc++] `<regex>`: Optional empty repetitions should not match
|
Labels |
libc++
|
Assignees |
|
Reporter |
Alcaro
|
```
> "aaa".match(/(a?)+/)
Array [ "aaa", "a" ]
> "bbebbee".match(/((b)?(be)?)+bbee/)
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 https://github.com/microsoft/STL/issues/5365)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs