I just ran into this seemingly not that hard issue of trying to match a multi-line regex against a 3Gb text file. What is the right tool for this? grep and perl failed running into PCRE limits.
Maybe some other PCRE-compatible implementation offers streaming. For instance, <a href="https://www.intel.com/content/www/us/en/developer/articles/technical/introduction-to-hyperscan.html" rel="nofollow">https://www.intel.com/content/www/us/en/developer/articles/t...</a> says it has this feature, but of course given who it's from it may be tied to a single brand of CPU.<p>github seems to be <a href="https://github.com/intel/hyperscan">https://github.com/intel/hyperscan</a>
Could you paste the regex portion of it please? Possibly some efficiencies to be gained there. You could also split the file into smaller chunks and then check the boundaries of the chunks.