Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-06-08 05:10:40

>I didn't see this in the reported bugs so I'm not sure whether its a
> known problem or not.
> C:\boost\>timer
> Enter expression (or "quit" to exit):
> ([[:digit:]]{1,}|[[:space:]]{1,}){1,}[[:alpha:]]{1,}
> Enter string to search (or "quit" to exit): 22222222222222222222
> abnormal program termination

Um yes, the program should catch the exception and report the cause: the
regex matching functions can throw if the expression starts consuming too
many cycles, in this case you've got the classic:

((something that matches)+)+(something that doesn't match)

expression, that will cause any Perl style regex-engine to fall over.
Boost.Regex does so by throwing an exception, most others just go on
thrashing away indefinitely. Decide for yourself which is better!


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at