mirror of
https://github.com/python/cpython.git
synced 2026-06-28 11:50:50 +00:00
Add support for \p{property} and \P{property} escapes in Unicode (str)
regular expressions, for the properties the engine can resolve without
the unicodedata database. They are matched as CATEGORY opcodes or as
fixed sets of character ranges.
Supported in this change: many General_Category values (the groups L, N,
Z, C and the values Lu, Lt, Lm, Nd, Nl, No, Zs, Zl, Zp, Cc, Cf, Cs, Co
and Cn); the binary properties Alphabetic, Lowercase, Uppercase, Numeric,
Printable, XID_Start, XID_Continue, Cased and Case_Ignorable; the POSIX
compatibility classes; the code-point classes ASCII, Any, Assigned,
Noncharacter_Code_Point, Join_Control, Pattern_Syntax and
Pattern_White_Space; and Regional_Indicator, ASCII_Hex_Digit and
Hex_Digit.
Property and value names use loose matching (UAX #44 UAX44-LM3), so a
property may be spelled \p{Lu}, \p{gc=Lu} or \p{name=yes}.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| python-mappings | ||
| comparecodecs.py | ||
| dawg.py | ||
| gen_expat_table.py | ||
| gencjkcodecs.py | ||
| gencodec.py | ||
| genmap_japanese.py | ||
| genmap_korean.py | ||
| genmap_schinese.py | ||
| genmap_support.py | ||
| genmap_tchinese.py | ||
| genwincodec.py | ||
| genwincodecs.bat | ||
| listcodecs.py | ||
| Makefile | ||
| makeunicodedata.py | ||
| mkstringprep.py | ||