I've been stuck on this strange std:wregex behavior :
^(?:(?:[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*\\w+[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*:/)|(?:\\./))(?:(?:[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*\\w+[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*/?)|(?:\\./)|(?:\\.\\./))*$
raise an exception with
e.code() == regex_constants::error_brack
The weird thing is that i've been testing it with an online ECMAScript regex validator without any troubles. Plus de fact that removing the first pair of brackets as follow.
^(?:(?:\\w+[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*:/)|(?:\\./))(?:(?:[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*\\w+[^\\u0000-\\u001f<>:\\\\\"/\\\\\\|\\?\\*]*/?)|(?:\\./)|(?:\\.\\./))*$
Actually solves the problem, without any particular regard to bracket mismatch.
Any one has an explanation to that kind of behavior ?
EDIT:
Seems that even L"[^\u0000-\u001f]" doesn't work.
EDIT:
I'm running a sample on compile and execute, didn't notice that it used GCC. Plus the fact that MVSC seems to be when GCC is giving me a runtime error (exception).
\\\\... before"and after/)b, that's like writing[^...<>:b\"/b\\|...].