I am trying to do a regex match with the following code:
std::wstring a1 = L"/key1 val1 /key2 val2 /key3 val3"; std::wregex re(L"\/[^\/]*"); std::wsmatch ws; if (std::regex_match(a1, ws, re)) { //do something }
I am expecting to see the following pair of matches:
/key1 val1
/key2 val2
/key3 val3
However, I am not seeing any match. Any idea why ?
If I try with L"/.+", then atleast I get a match of the whole string.
Thanks.