intel / hyperscan

High-performance regular expression matching library
https://www.hyperscan.io
Other
4.8k stars 715 forks source link

New Feature Request - Support for limiting match count per pattern #402

Open simpleyetawesomeprojects opened 1 year ago

simpleyetawesomeprojects commented 1 year ago

Limiting the number of match counts for each pattern would be a great feature.

Say there are two regexes, R1 and R2 and we want to limit R1 matches to 10 and R2 matches to 50. This feature will enable us to find only the desired number of match count and exit early instead of looking for all the matches in the input