简单写一下正则表达式的一个常用的工具,PCRE,用法还算简单,直接上代码了:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pcre.h"
#include <unistd.h>
#include <iostream>
#define N 10240
#define M 30
int main(int argc, char *argv[])
{
const char *error;
pcre *re;
int erroffset;
int ovector[M];