|
Boost Users : |
From: yogendra karki (karki.yogendra_at_[hidden])
Date: 2006-07-28 06:03:40
Thanks for your reply John.
i can not reproduce the bug, because it is not happening every time.
sometimes the application is running fine and sometimes it is causing problem.
I am using "gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)".
John Maddock <john_at_[hidden]> wrote: yogendra karki wrote:
>> 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.
Well plainly that shouldn't happen: as a first step I would get your
debugger to break on thrown exceptions, then walk up the stack and verify
that the regex being passed is actually valid. If you suspect a regex bug
then you will have to supply a test case so I can reproduce the issue here.
Regards, John Maddock.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net