Finding all instances of a substring in a string

Posted by Mr Aleph on Stack Overflow See other posts from Stack Overflow or by Mr Aleph
Published on 2011-03-02T15:19:10Z Indexed on 2011/03/02 15:25 UTC
Read the original article Hit count: 247

Filed under:
|

In my last question I asked about parsing the links out of an HTML page. Since I haven't found a solution yet I thought I tried something else in the meantime: search for every <a href= and copy whatever is there until I hit a </a>.

Now, my C is a bit rusty but I do remember i can use strstr() to get the first instance of that string, but how do I get the rest?

Any help is appreciated.

PS: No. This is not homework on school or something like that. Just so you know.

© Stack Overflow or respective owner

Related posts about c

    Related posts about string-manipulation