#include #include using namespace std; struct pcre_res { int pos; int len; string sub; }; class regex { public: regex(); ~regex(); bool found; regex(const regex& re); regex& operator= (const regex& re); // First set of parenthetical matches vector matches; // Whole matches, repeated (//g) vector global_matches; }; regex pcre_match(string pattern, string target); regex pcre_match_num(string pat, string tar, bool global ); string pcre_replace(string pattern, string target, string replacement); string string_replace(string subject, string find, string replacement);