Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4036: hang search
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-23 16:56:15
#4036: hang search
--------------------------------------+-------------------------------------
Reporter: propheticoleg@⦠| Owner: johnmaddock
Type: Bugs | Status: closed
Milestone: Boost 1.43.0 | Component: regex
Version: Boost 1.42.0 | Severity: Problem
Resolution: worksforme | Keywords: regex_search
--------------------------------------+-------------------------------------
Changes (by johnmaddock):
* status: new => closed
* resolution: => worksforme
Comment:
Works for me with current SVN Trunk and the simple test case below (throws
an exception because the match takes too long to find). Please provide a
self contained test case and details of the compiler used plus Boost
version if you still think there is a problem.
{{{
// scrap.cpp : Def
#include "stdafx.h"
using namespace boost;
using namespace std;
int main()
{
regex e("(?:(((((((-{0,1}((([0-9][ ]{0,1}){1,}([\\.,][ ]{0,1}([0-9][
]{0,1}){1,}([ ]{0,1}(([\\(]([0-9]{1,3}[ ]{0,1})[\\)]))){0,1}){0,}))))[
]{0,1}){0,1}((îäèÃ|îäÃà |one|äâà |äâå|two|òðè|three|÷åòûðå|four|ïÿòü|five|øåñòü|six|ñåìü|seven|âîñåìü|eight|äåâÿòü|nine|äåñÿòü|ten|îäèÃÃà äöà òü|eleven|äâåÃà äöà òü|twelve|òðèÃà äöà òü|thirteen|÷åòûðÃà äöà òü|fourteen|ïÿòÃà äöà òü|fifteen|øåñòüÃà äöà òü|sixteen|ñåìÃà äöà òü|seventeen|âîñåìÃà äöà òü|eighteen|äåâÿòÃà äöà òü|nineteen|äâà äöà òü|twenty|òðèäöà òü|thirty|ñîðîê|forty|ïÿòüäåñÿò|fifty|øåñòüäåñÿò|sixty|ñåìüäåñÿò|seventy|âîñåìüäåñÿò|eighty|äåâÿÃîñòî|ninety|ñòî|äâåñòè|òðèñòà |÷åòûðåñòà |ïÿòüñîò|øåñòüñîò|ñåìüñîò|âîñåìüñîò|äåâÿòüñîò|ñîòÃÿ|ñîòÃè|ñîòåÃ|hundred
and|hundred|òûñÿ÷à |òûñÿ÷è|òûñÿ÷|òûñ\\.|òûñ|thousand
and|thousand|ìèëëèîÃîâ|ìèëëèîÃà |ìèëëèîÃ|ìëÃ\\.|ìëÃ|million
and|million|ìèëëèà ðäîâ|ìèëëèà ðäà |ìèëëèà ðä|ìëðä\\.|ìëðä|milliard
and|milliard|billion and|billion)[ ]{0,1}){1,})|(((((-{0,1}((([0-9][
]{0,1}){1,}([\\.,][ ]{0,1}([0-9][ ]{0,1}){1,}([ ]{0,1}(([\\(]([0-9]{1,3}[
]{0,1})[\\)]))){0,1}){0,}))))[
]{0,1})((îäèÃ|îäÃà |one|äâà |äâå|two|òðè|three|÷åòûðå|four|ïÿòü|five|øåñòü|six|ñåìü|seven|âîñåìü|eight|äåâÿòü|nine|äåñÿòü|ten|îäèÃÃà äöà òü|eleven|äâåÃà äöà òü|twelve|òðèÃà äöà òü|thirteen|÷åòûðÃà äöà òü|fourteen|ïÿòÃà äöà òü|fifteen|øåñòüÃà äöà òü|sixteen|ñåìÃà äöà òü|seventeen|âîñåìÃà äöà òü|eighteen|äåâÿòÃà äöà òü|nineteen|äâà äöà òü|twenty|òðèäöà òü|thirty|ñîðîê|forty|ïÿòüäåñÿò|fifty|øåñòüäåñÿò|sixty|ñåìüäåñÿò|seventy|âîñåìüäåñÿò|eighty|äåâÿÃîñòî|ninety|ñòî|äâåñòè|òðèñòà |÷åòûðåñòà |ïÿòüñîò|øåñòüñîò|ñåìüñîò|âîñåìüñîò|äåâÿòüñîò|ñîòÃÿ|ñîòÃè|ñîòåÃ|hundred
and|hundred|òûñÿ÷à |òûñÿ÷è|òûñÿ÷|òûñ\\.|òûñ|thousand
and|thousand|ìèëëèîÃîâ|ìèëëèîÃà |ìèëëèîÃ|ìëÃ\\.|ìëÃ|million
and|million|ìèëëèà ðäîâ|ìèëëèà ðäà |ìèëëèà ðä|ìëðä\\.|ìëðä|milliard
and|milliard|billion and|billion)[ ]{0,1}){0,}))))[
]{0,1}(øòóê|øò\\.|øò|åäèÃèö|åä\\.|åä))(?:[^A-Za-zÃ-Ãà -ÿ/]|$))");
std::string text("The following phone numbers were returned in this
area code:\n\n3123484973, 3123488416, 3123488393, 3123485219, 3123480807,
3123482560, 3123483792, 3123486264, 3123484451, 3123485172, 3123486573,
3123489859, 3123482700, 3123488701, 3123480783, 3123489095, 3123488519,
3123480121, 3123482416, 3123489534, 3123483804, 3123488660, 3123485544,
3123484113, 3123480599, 3123482042, 3123488537, 3123482887, 3123483914,
3123484208, 3123482591, 3123482974, 3123488856, 3123480352,
3123484017...");
std::cout << regex_search(text, e) << std::endl;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4036#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC