QUERY · ISSUE
ure: character classes not working in sets
enhancementextmod
All of these assert statements fail, but I don't think they should:
import ure
assert ure.match('[\\w]', "a") is not None
assert ure.match('[\\s]', " ") is not None
assert ure.match('[\\d]', "1") is not None
assert ure.match('[\\w.]*$', "boot.py") is not None
CANDIDATE · ISSUE
extmod: re treats `\r` and `\n` as literal `r` and `n`
extmod
All of these assert statements fail, but shouldn't:
import re
assert re.search(r'\r', 'bar') is None
assert re.search(r'\n', 'barn') is None
assert re.search(r'\n', 'bar\n').group(0) == '\n'
These work fine in CPython with re and in MicroPython with re-pcre.
Thanks,
Alex