I need a regex to get MyName ( MyName may contain any character except ” ) from this string:
lablabla name="MyName" user="MyUser" lablabla
I used:
boost::regex reg(".*name=\"(?<action>.*)\"\\s.*", boost::regex::perl);
but it returns:
MyName" user="MyUser
How about:
which makes it ungreedy; or:
which explicitly specifies that the action cannot contain double quotes.