Serhiy Storchaka <[email protected]> added the comment:
PR 3885 is a preliminary but working implementation. Needed new tests and
documentation.
>>> import re
>>> re.findall('(?i:[a-z]+)', ''.join(map(chr, range(0x10000))))
['ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz', 'İı', 'ſ', 'K']
>>> re.findall('(?ia:[a-z]+)', ''.join(map(chr, range(0x10000))))
['ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz']
The engine now uses separate opcodes for case-insensitive matching in ASCII,
UNICODE and LOCALE modes. It may cause small speed up of matching, but slow
down of compiling.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31690>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com