Is there a OS-independent or Windows-specific way to stop a regex search after a given amount of time or on user request?
My program provides text editing functionality with regex searching. If a user enters a pathological regex pattern searching may need too much time. It would be good to stop the search at user request or at least after a given timeout.
I found solutions for Linux/Unix using signal.alarm()
but this function isn't supported on Windows.