When I step through the code in the debugger I see the following results:
bRet1=bRet2=bRet3=true
bRet4=false
I expected all four strings to match the pattern. My thinking was that any combination of 'h' or ' h' would match. Why does ' h h' not match?
Also, if I change the pattern to "( *h)+" then std::tr1::regex_match(" h h", re); does return true (along with " h h" and " h h h h" also returning true). Thank you in advance for any help in understanding the algorithm being used by the windows std regex library.
i use perl re's, so i dont know if this would be the case with ECMAscript, but you had an h, and then it saw the +, so it needed to match again, but it hit a space so it stopped
I've learned now that when using Visual Studio 2008 the regular expression works as expected (' h h') does match. Appears to be a bug in the 2010 version of the regex library.