Boost C++ Libraries: Ticket #4036: hang search https://svn.boost.org/trac10/ticket/4036 <p> The string with many numbers and not simple expression on numbers will hang search without any messages or exceptions. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4036 Trac 1.4.3 propheticoleg@… Tue, 23 Mar 2010 11:44:46 GMT attachment set https://svn.boost.org/trac10/ticket/4036 https://svn.boost.org/trac10/ticket/4036 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">document.txt</span> </li> </ul> <p> document wirh analyzing text </p> Ticket propheticoleg@… Tue, 23 Mar 2010 11:45:37 GMT attachment set https://svn.boost.org/trac10/ticket/4036 https://svn.boost.org/trac10/ticket/4036 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">regular expression.txt</span> </li> </ul> <p> regular expression for analyzing </p> Ticket John Maddock Tue, 23 Mar 2010 16:56:14 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4036#comment:1 https://svn.boost.org/trac10/ticket/4036#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> 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. </p> <pre class="wiki">// 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 &lt;&lt; regex_search(text, e) &lt;&lt; std::endl; } </pre> Ticket