When using the C++(msvc compiler) regular expressions library(boost and stl), I have found that many of Online Tested(all from the Regex Stack Overflow FAQ) regular Expressions do not work, For Example:
\w
([\w]+)
[a-z]
[abcdef] \\etc...
I am using Raw Literals for my regex's So that's not the problem.
The Code i am currently using to test them is
string somestring="something othersomething";
regex Test(R"(\w)",boost::regex_constants::JavaScript);
smatch match;
if(regex_match(somestring,match,Test))cout<<"True"<<endl;
else cout<<"false"<<endl;
When I try it in different Languages like Java this works why doesn't it C++?
P.S I have a feeling it is something to do with reading white spaces differently.