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 ability to choose regex encoding type #38

Open
spender-sandbox opened this issue Feb 3, 2016 · 0 comments
Open

Add ability to choose regex encoding type #38

spender-sandbox opened this issue Feb 3, 2016 · 0 comments

Comments

@spender-sandbox
Copy link

Would it be possible to add support for Latin-1 encoding of regexes? Currently the re2 module can't be used as a drop-in replacement of 're' for pretty simple regex searches of binary data because of it forcing UTF-8 encoding on the regexes.
https://github.com/axiak/pyre2/blob/master/src/re2.pyx#L950

RE2 itself supports it, it would just be a matter of adding the option to pass _re2.EncodingLatin1 there.

Thanks!
-Brad

spender-sandbox added a commit to spender-sandbox/pyre2 that referenced this issue Jul 19, 2016
So re2 can be used as a drop-in replacement for re when searching for raw bytes

Reported here months ago: axiak#38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant