Reputation: 1
I'm trying to parse some text to figure out if it's a link or not. This is the code I have:
smatch m;
regex e("http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+");
bool match = regex_search(proto->message, m, e);
if(match == true) {
chan->Say("Matched link");
}
The error I'm getting is:
/main.cpp|26|error: no matching function for call to ‘regex_search(char [1024], boost::smatch&, boost::regex&)’|
When I take the m out of regex_search
it works and returns a boolean
, but I want know what the actual match was.
Upvotes: 0
Views: 108