I have a long list of words that I want to find in a large string. There are about 500 words, and a line is usually around 500 thousand.
PCRE gives an error message preg_match_all: Compilation failed: regular expression is too large at offset 704416
Is there an alternative to this? I know that I can recompile PCRE with a higher internal connection size, but I want to avoid mess with server packages.
source
share