Boost logo

Boost Users :

From: Adam Molnar (ed_at_[hidden])
Date: 2004-05-01 17:28:11


hi!

the following pattern (35 matching token, and at least one more) with this
simple expression ("[_]+$") throws "memory exhausted" when
using wchar_t strings. the same works with char strings even triple sized.
matching doesnt throw, if we use "^[_]+$", "[_]{1,}$", "[_][_]*$" etc. so
this is a bug.
it seems the expression-string is short enough to cause some problem, but i
was unable to track down the error.

wchar_t * wp = L"___________________________________x";
wregex wre(L"[_]+$");

try
{
        regex_search(wp, wre);
}
catch (bad_expression & e)
{
        cout << e.what() << endl;
}

another issue:
i think, "(one|two|three|)" style alternation (notice the empty string on
the right) should be accepted and handled as "(one|two|three)?"
now it throws bad_expression


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