Kyle Alons wrote:
The attached sample works properly in boost v1.30.2 but fails with a 'Memory exhausted' exception in v1.31 through v1.33.1. Is this a bug, and/or do you have any ideas on rephrasing the expression to work in boost 1.33.1? Thanks.
Kyle: the trick with these is to change the expression to make it as unambiguous as possible: the exception is thrown when the regex state machine visits too many states while trying to find a match and then gives it up as a lost cause rather than risking looking indefinitely. In this case the first (.*|\\n*) is superfluous since . can match \n as well, so the machine can "thrash" if it encounters a lot of whitespace. Using (?!System)* fixed the problem and brought the execution time down enormously. HTH, John.