I need to search a string with whitespace using Boost:regex search, but it never matches.
I need to get the username from the work mail (second match in the input below), but the order can change, so I need to scan the whole string.
Input:
homemail: mail:username@mail.com workmail: mail:username@mail.com
Regex:
workmail: mail:\s*([^@>;]*)
In pcre it works correctly: http://regex101.com/r/uD4pH7/1
In Boost, I've tried a lot of ways like:
workmail: mail:\s*([^@>;]*)
workmail:\\smail:\s*([^@>;]*)
workmail:\\x20mail:\s*([^@>;]*)
\\Qworkmail: mail:\\E\s*([^@>;]*)
workmail:[[:space:]]mail:\s*([^@>;]*)
workmail:[[:s:]]mail:\s*([^@>;]*)
My boost lib version is 1.42.0 installed via apt in Debian 6 system. I'm using the boost::regex_search function.