Open
Description
#include <regex>
#include <stdio.h>
int main() {
try {
std::regex r{"\\00"};
puts("valid");
} catch (const std::exception& e) {
printf("not valid: %s\n", e.what());
}
try {
std::regex r{"\\01"};
puts("valid");
} catch (const std::exception& e) {
printf("not valid: %s\n", e.what());
}
}
Expected: Reject them. 00 and 01 do not match DecimalIntegerLiteral in the JS spec, and lookahead can't be a digit either.
Actual: Both are valid. (Can't find what they're actually parsed as, though.)
https://godbolt.org/z/heM1o1aGe (MS-STL is busy fixing it microsoft/STL#5380)