I have a big text and badly wroten regular expression. :) Matching uses about 100% CPU and can continue several hours.
The task is to interrupt matching by timeout in 1 second.
I use alarm but it interrupts only in 20-30 minutes.
Are there any ways to do in 1 second without modification of regular expression?
Thanks in advance.