c++ - Boost regexp how to parse Cookie string into map<string, string>? -
so cookie strings remixsettings_bits=1; wysiwyg=1,2,3,abc; remixclosed_tabs=0; remixgroup_closed_tabs=786432; remixlang=0; remixchk=5; remixsid=35d4f9907281708019490d07728c27ca5c10e5de7a869c322222225e3219e; audio_vol=100
wonder how parse tham map name
<-> value
?
try regex: (\w+)=([^;]*)
\w+
- alphanumeric 1 or more repetitions=
[^;]*
- character except;
number of repetitions
result:
Comments
Post a Comment