|Don't ask to ask, just ask
Growing strings in searchby b4swine (Pilgrim)
|on Apr 15, 2020 at 13:15 UTC
b4swine has asked for the wisdom of the Perl Monks concerning the following question:
Dear Wise Ones,
I have a fixed complex regex. And I have hundreds of strings (at any one time) which are growing at the rate of about 50 chars per second. Around a few thousand character size, strings die, but others are reborn. I need to be continuously be checking the strings, all against the same regex, and raise an alarm if the regex succeeds against any string.
The problem is that after adding just one character, I need to start the whole search again. Is there any way to incrementally continue the search from where it last left off? This is a real-time problem, and checking after every 5 characters is not acceptable.