stl regex
stl 中regex 非常好用,即使不用boost库也可以很轻易地且高效地摘取你想要的内容,这里提供一个class 解析出 a href 的文件名路径和文件名和文件后缀名 另外需要解析url的朋友可以看这篇文章: 解析url的代码
代码 show me the code/*
author:qianbo
date :2014-11-06
功能 :解析html A href 取出其中的连接,解析出全路径 文件前缀 文件后缀
*/
#include
#include
#include
#include
#include
#include
using namespace std;
typedef struct dataHtmlFile
{
string s1; //全路径
string filePrefix; //文件前缀
string fileSuffix; //带dot的文件后缀 如 .png .jpg
}dataHtmlFile;
template
class PrintString
{
public:
PrintString()
{
}
void operator ( ) ( Type& elem ) const
{
cout
关注
打赏