[Bug 265480] std::regex constructor throwing an exception at backslash-underscore but not other invalid escapes
Date: Thu, 28 Jul 2022 17:17:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265480 Kyle Evans <kevans@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kevans@freebsd.org --- Comment #1 from Kyle Evans <kevans@freebsd.org> --- (In reply to Milo Cooper from comment #0) If std::regex is just a shim for libc regex(3), then yes, this is expected. As of 13.0-ish, we've started rejecting many escapes of ordinary characters (this is UB according to POSIX, and shouldn't be considered portable). Some of them are imbued with special meaning by libregex to match GNU expectations (e.g., \w/\W, \b/\B, \s/\S, \<, \>), so we're trying to avoid some confusion by not having a "working" expression in both libc and libregex -- it either compiles and you get the GNU behavior, or it doesn't compile and you're made aware that you need libregex if you expected GNU behavior. -- You are receiving this mail because: You are the assignee for the bug.