-
Notifications
You must be signed in to change notification settings - Fork 13
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
escaped forward slashes? #20
Comments
This isn't a behavior of the binding. This is a behavior of the underlying regex library. The regex library does not let you escape characters that don't need to be escaped. Forward slashes are not special characters in the regex language. More generally, there is no intent for rure to be drop in compatible with any other regex engine. There are a number of differences between them beyond escaping. |
Thanks for the quick reply. So i guess the python implementation is just more lenient, and i guess uap escapes slashes in case they're used by eg a javascript engine? |
I'm on vacation, so I don't know off hand with certainty, but I don't think So I don't know why they escape them. You'd have to ask them. They probably needlessly escape other things too. |
The Python wrapper does take some attempts to be as drop-in as possible. This package provides a compatibility layer to translate the Python standard library method signatures and flags to those used by This package will always be more strict than the standard library when parsing input expressions. |
Include note about the engine rejecting some expressions the standard library will accept (see #20 ).
I left a note about this in the readme ( ea26d71 ). @davidszotten if you would like further explanation in the readme, let me know. |
Hi,
when trying to use rure on https://github.com/ua-parser/uap-core, i came across this behaviour where rure isn't consistent with re. i'm not sure who's "right"
The text was updated successfully, but these errors were encountered: