Hello all,
i am using boost regex to check the syntax of a URL. the regex is as :-
static const char *URLSYNTAXREGEX = "^((file|https?|ftp)://)?(([-a
-zA-Z0-9_]+[.]{1})+(([-a-zA-Z0-9]+))([:]{1}([0-9]+)){0,1})([?/][^[:space:]]*)?"
the function for evaluation is:-
bool URLHandler::EvaluateRegex(const char *regularexp,std::string url){
boost::smatch what;
boost::regex exp(regularexp,boost::regex::extended);
boost::regex_search(url,what,exp);
std::string search=(std::string)what[0];
if(search.length() == url.length())
{
return
true;
}
else
{
return false;
}
}
when i am running this code with single thread it is running fine. But when i am integrating this code with a multithreaded application it is giving this error:-
terminate called after throwing an instance of 'boost::regex_error'
what(): Invalid content of repeat range
Aborted
Can you please help me in this. Its very urgent for me.
Thanks.
Yogendra
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.