Match a string agains a set of regexes
Hyperscan is a high-performance multiple regex matching library that uses hybrid automata techniques to allow simultaneous matching of large numbers of regular expressions across streams of data. They explained their approach here:
https://www.hyperscan.io/2015/10/20/match-regular-expressions
Apparently, they didn't find a fast algorithm (in the worst case) for this problem: &quot;We have not found a single, elegant automata approach that handles arbitrary regular expressions in arbitrary number&quot;. However, they used a lot of optimization which works well enough in practice.
I also believe that in the worst case, the given regular expressions can be so complex that no better solution exists.