i would like to parse a json that looks like this and only get the values:
"{name: \"Username\", id: \"UserId\"}"
This means, i would like to receive "Username" and "UserId".
I am using the <regex>
and the regex object is the following:
regex regex1("\\{name: (.+), id: (.+)\\}");
But this doesn't output the values that i am expecting. I would really appreciate a solution to this and if possible the showing me the error that i made.
Language: C++ (since it uses the ECMAscript Regular expression, any answers in other languages are welcomed).
Thank you.
Comments
Post a Comment