Hey all,
I usuallly don't like asking for help on these sites but I have been kicking myself for a while now implementing boost regex for a program (i have never had any prior issues). I believe the issue is with my regex syntax but i have tried numerous variations and have yet to have a successful run. It looks like:
scrape(game, "<some-tag>(.*?)</some-tag>", 1);
fairly simple. the scrape function is a public function for a handler class i made which is implemented like:
std::string my_class::scrape(const std::string &base, const std::string &match, const int &set)
{
boost::regex re(match);
boost::smatch matches;
if(boost::regex_search(base, matches, re))
{
std::string value(matches[set].first, matches[set].second);
return value;
}
return "";
}
Like I said, I think the issue has something to do with '<', '>', or some other syntax in the regex.
Any help would be greatly appreciated. Thank you