flier / gohs

GoLang Binding of HyperScan https://www.hyperscan.io/
Other
280 stars 51 forks source link

Get regexp index from match #18

Closed rashkur closed 4 years ago

rashkur commented 5 years ago

Hello there. Thank you for nice library. I'm playing with your examples now, but cannot find, how to get index of matched regex from database. For my use case it would be perfect (I'm uploading huge table of regular expressions into block databse and want to get only matched regexp index to return url by index from second table).

flier commented 5 years ago

Please use DatabaseBuilder to build database if you want to match multi-patterns, and the event will give you the matched pattern id.