A
AlexS
Hi
Is there a way to interrupt long running regex parsing operation or perform
it in a way, which will allow to specify max time of parsing?
I use regex to check basic format of some messages. In some cases, when
format is wrong, regex takes 100% cpu for very long time - in excess of
minutes. I would like to be able to control this process, for example, when
regex expression can't be evaluated in 0.5 second it should be aborted. Then
I can use more specialized parsing expression.
I seem not to be able to find a way to solve this issue in elegant way.
Any pointers available?
Thanks!
Is there a way to interrupt long running regex parsing operation or perform
it in a way, which will allow to specify max time of parsing?
I use regex to check basic format of some messages. In some cases, when
format is wrong, regex takes 100% cpu for very long time - in excess of
minutes. I would like to be able to control this process, for example, when
regex expression can't be evaluated in 0.5 second it should be aborted. Then
I can use more specialized parsing expression.
I seem not to be able to find a way to solve this issue in elegant way.
Any pointers available?
Thanks!