-
Notifications
You must be signed in to change notification settings - Fork 520
Regexscan fixes #1829
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
base: develop
Are you sure you want to change the base?
Regexscan fixes #1829
Conversation
SolitudePy
commented
Jun 7, 2025
- use maxsize argument
- switched match to search to search the whole chunk
- moved some code from _generator() to run() to reduce overhead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, shift the regex compilaytion back into the generator to avoid potential skew. I'm also unkeen on the utf-8/latin1 munging for the sake of it. Otherwise good catch on maxsize not being used
|
||
# reapply the regex in order to extract just the match | ||
regex_result = re.match(regex_pattern, result_data) | ||
regex_result = compiled_pattern.search(result_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The need for this is somewhat annoying, but probably can't be improved at this point without breaking the regexscanner...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better, thanks. Just a couple more tweaks, nearly there 5:)