Boost logo

Boost :

From: Demian Nave (demian_at_[hidden])
Date: 2008-02-02 12:36:38


Sebastian Redl wrote:
> Marshall Clow wrote:
>
>> I am in need of a library to parse/encode/decode URLs.
>>
> URLs are too complex for normal regular expressions to take apart in one
> step.
Actually, this isn't true. Though I make no claims on efficiency, I
built a 1-step Boost.Regex-based
solution which you can take a look at here:

https://vs.psc.edu/repositories/psctools/Tools/trunk/systools/systools/uri.h

https://vs.psc.edu/repositories/psctools/Tools/trunk/systools/src/uri.cpp

It follows the RFC at:

http://www.apps.ietf.org/rfc/rfc3986.htm

And there are a number of test cases here:

https://vs.psc.edu/repositories/psctools/Tools/trunk/systools/tests/uri/

Hope this helps. Definitely let me know if you find the code useful, and
if you find any bugs. Note that there are some soft dependencies to other
code which should be easy to spot and remove.

Cheers,
Demian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk