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 |
tannewt
left a comment
There was a problem hiding this comment.
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