Boost logo

Boost-Build :

From: blyon1 (billlyon_at_[hidden])
Date: 2005-08-24 13:14:41


Hello,

I believe I've run across a bug in the regex library. The following
code throws a boost::bad_expression error "Memory exhausted" in
boost_1_32_0.exe:

string sTmp1, e2, s4;

e2 = "(\\d*[ ]+)+((1)[ ]*/[ ]*2)(\\s)*
(teaspoon|tablespoon|cup|pint|quart|gallon)([s]{0,1})([\\s*\\w*]*)$";
sTmp1 = "GOLDEN_STATE CM *** PM102 AUG16 14:57:54 6575 SYSB
\r\n";
sTmp1 += ".\r\n";
sTmp1 += "\r\n";
sTmp1 += " ICRM 165 \r\n";
sTmp1 += ".\r\n";
sTmp1 += "\r\n";
sTmp1 += " Node : SysB From ISTb\r\n";
sTmp1 += ".\r\n";
sTmp1 += "\r\n";
sTmp1 += " ISTb Cleared (Unit ISTb)\r\n";
sTmp1 += ".\r\n";
sTmp1 += "\r\n";
sTmp1 += " Unit0 Act : SysB (D-Channel down) From InSv\r\n";
sTmp1 += ".\r\n";
sTmp1 += "\r\n";
sTmp1 += " Unit1 Inact: UnEq \r\n";
sTmp1 += ".\r\n";
s4 = regex_replace(sTmp1, boost::regex(e2), "$1 and $3 half $5$6$7.");

Thanks,
Bill Lyon

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk