Boost logo

Boost Users :

From: Matthew Peltzer (goochrules_at_[hidden])
Date: 2004-12-28 00:45:17


> I am trying to use Spirit to parse lines like:
>
> name:value
>
> but, name might contain colons also. I've not been able to come up
> with anything that parses this correctly without swallowing up the
> rest of the document. Anyone able to help?

Seeing your code would be a good first step in helping you, but I
imagine something like the following should work as desired:

+(+(alnum_p | ':') >> ':' >> +(alnum_p) >> eol_p);

-- Matthew Peltzer
-- goochrules_at_[hidden]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net