-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
extmod/ure: Extend functionality #1544
Conversation
I'm wary of splitting what |
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_GROUPS, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_SPAN_START_END, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
This feature is controlled at compile time by MICROPY_PY_URE_SUB, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
Fix MicroPython #3176 Handle escape sequences inside regular expressions. This adds handling for \a, \b, \f, \n, \r, \v and \\.
MICROPY_PY_URE_MATCH_SPAN_START_END is used to enable the functionality since it's similar.
Remove the samd module which has representations of the clocks. This is done to save on precious flash.
This enables ure.sub(), Match.span/start/end() and the ure.Compile.search/match() pos/endpos arguments.
I have removed the |
Note that I have just started doing a large refactor of the |
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.
Ok great! Thank you for adding this.
This PR adds:
match(..., pos, endpos)
patch that enabled me to port the CPython textwrap module without a lot of custom parsing codeThis PR uses 1100 bytes of flash