-
Notifications
You must be signed in to change notification settings - Fork 20
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
Issue translating regular expression (via XMLSchema) #75
Comments
I have confirmed this fixes the issue. Submitting PR |
Hi, |
I have added what I believe will fix the failing tests, but I'm not sure how to trigger a re-test. |
You cannot trigger CI tests on the origin repo, maybe you could set something in your fork project. But for this case running local tests in the usual mode for I'll keep this issue open until the next release of the package is published. thank you |
It appears that the tests have run successfully for the updated PR! Let me know if you have any other concerns. |
Hi, a new release of the package is available, so i close the issue. |
elementpath/elementpath/regex/patterns.py
Line 125 in 4a16680
Hi, I'm running into a problem in xmlschema, but I think it may be related to this library.
I am developing an application to generate code from a specific XML schema, and I need to extract patterns from an XSD into python regular expressions for injection into templates.
Generally, it works quite well! However, I have noticed an issue with the pattern
\\S(.*\\S)?
, intended to describe a string with no leading or trailing spaces. This pattern is translated into^(?:\\S(?:[^\r\n]*\\S)?)$(?!\\n\\Z)
- note that the [^\r\n] in the middle of the string does not have a double escape.I believe the line I reference above is the culprit - it does not use a raw string, like the rest of the examples in this module. The result is that this sequence is translated into:
when I pass it to another library. Does this appear to be the issue? I can submit a pull request, but wanted to see if you agree with my troubleshooting.
Thanks!
The text was updated successfully, but these errors were encountered: