|
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!
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