Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-06-15 14:24:52


Andriy Tylychko (mail.ru) wrote:
> Hi,
>
> The code looks like:
>
> std::string buffer(10240, '\0');
> // ... fill buffer
> boost::regex e("#1.*#7");
> boost::smatch m;
> boost::regex_search(buffer, m, e);
>
> The buffer of 10KB is full of "something #x". As result I receive
> regex_constants::error_space at
> boost\regex\v4\perl_matcher_non_recursive.hpp:164.
> I'll highly appreciate any help.

You shouldn't get that exception from that expression: that exception is
raised when the number of states visted in the search for a match looks to
be growing exponentially, it's usually caused by "pathological" regular
expressions like "(.*)*" that can end up searching forever on some inputs.

Do you have a more specific test case please?

John.


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