tags:

views:

734

answers:

3

Hi,

Im wondering how to parse a url into an URL object(of some kind) in C. So that I would be able to extract key/val objects from a querystring.

Have looked at: http://stackoverflow.com/questions/726122/best-ways-of-parsing-a-url-using-c

And several other resources, even Google Code, but haven't found anything in my taste.. And no, using sscanf, and regex is not an alternative. Saying, unless I have to write my own parser..

Would be greatful for any tips or help on where I could find this!

+2  A: 

UriParser

Pavel Minaev
+2  A: 

Looking at wget would be worth it. Download the source and look at url_parse function in src/url.c.

Hope this helps.

ardsrk
A: 

I extracted a the parser from wget:

http://eduardo38.netne.net/url_parse.tar.gz

Eduardo