I need to ext开发者_运维问答ract all links from html page using regular expressions in C++. Can anybody help me please ?
This is a hard job for a regex, and in C++ it's even harder. I actually wrote a parser for a project I did for school a few years ago. You can use this if you find that it works, but I would test it on what you want before you rely on it for anything important.
Feel free to modify/use it, whatever
I realized there were some mistakes in my code, and that I should probably include the header file. Also included is the cmakelists file but it's trivial. The ParserTest.cpp file basically lets you parse links from an input string from the command line.
http://www.mediafire.com/?0u5ppq0gzgdyg
精彩评论