Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add args for early termination of scanning if only need to find one match regex or just judging matched #118

Open
betterlch opened this issue Feb 22, 2024 · 0 comments

Comments

@betterlch
Copy link

Thanks for your excellent work!

And here is some using case to improve

I'm catching hyperscan.ScanTerminated to break scan if I return True and raise HS_SCAN_TERMINATED error in callback func match_event_handler. Which can early termination of scanning if I only want to know is matched but don't care whitch regex is mtached.
It can be achieved by catching hyperscan.ScanTerminated or modify Database_scan in hyperscanmodule.c by judging HS_SCAN_TERMINATED and HS_SUCCESS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants