I have a chunk of text like:
Name=Long John Silver;Profession=cook;Hobby=Piracy
And using the Boost::regex library I am trying to get the value of each attribute so I have the following regular expression for Name:
regex(".*Name=([^;$]*).*")
I understand it as "get everything after Name= until you find a ; or the end of line". However what I am obtaining using regex_match
is only "Long", no spaces. Of course I have been trying with several RE combinations but I am not able of working it out.
Any clue? Cheers.