Created on 2021-09-27.00:00:00 last changed 37 months ago
[ 2021-10-14; Reflector poll ]
Set priority to 3 after reflector poll.
ECMAScript says that \0 is an ordinary character and can be matched. POSIX says the opposite:
"The interfaces specified in POSIX.1-2017 do not permit the inclusion of a NUL character in an RE or in the string to be matched. If during the operation of a standard utility a NUL is included in the text designated to be matched, that NUL may designate the end of the text string for the purposes of matching." So does that mean std::regex{"", 1, regex::basic} should throw an exception? And std::regex_match(string{"a\0b", 3}, regex{"a.b", regex::basic}) should fail? The POSIX rule is because those interfaces are specified with NTBS arguments, so there's no way to distinguish "a\0b" and "a". The C++ interfaces could allow it, but we never specify any divergence from POSIX, so presumably the rule still applies. Is that what was intended and is it what we want?History | |||
---|---|---|---|
Date | User | Action | Args |
2021-10-14 11:35:36 | admin | set | messages: + msg12160 |
2021-09-27 00:00:00 | admin | create |