diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-07-28 17:22:36 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-07-28 17:22:36 (GMT) |
commit | 1f268285ff810681612c8f7c91c1faeb70535f52 (patch) | |
tree | 8531e2c66af998125d53694c82626e8a1a204364 /Doc/library/re.rst | |
parent | 6bd13fbbc8b4917023d124d6523685d456a8e92a (diff) | |
download | cpython-1f268285ff810681612c8f7c91c1faeb70535f52.zip cpython-1f268285ff810681612c8f7c91c1faeb70535f52.tar.gz cpython-1f268285ff810681612c8f7c91c1faeb70535f52.tar.bz2 |
Issue #6561: '\d' in a regular expression should match only Unicode
character category [Nd], not [No].
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 3b2f70b..cdb9951 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -338,11 +338,12 @@ the second character. For example, ``\$`` matches the character ``'$'``. ``\d`` For Unicode (str) patterns: - Matches any Unicode digit (which includes ``[0-9]``, and also many - other digit characters). If the :const:`ASCII` flag is used only - ``[0-9]`` is matched (but the flag affects the entire regular - expression, so in such cases using an explicit ``[0-9]`` may be a - better choice). + Matches any Unicode decimal digit (that is, any character in + Unicode character category [Nd]). This includes ``[0-9]``, and + also many other digit characters. If the :const:`ASCII` flag is + used only ``[0-9]`` is matched (but the flag affects the entire + regular expression, so in such cases using an explicit ``[0-9]`` + may be a better choice). For 8-bit (bytes) patterns: Matches any decimal digit; this is equivalent to ``[0-9]``. |