From 603ad8577cbbb41d7ea7f73229dfcf0a95818a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 4 Jan 2020 16:04:38 +0100 Subject: [PATCH] String --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c7a3bf0..21c0d5e 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ String | isdecimal() | | | | | yes | +---------------+----------+----------+----------+----------+----------+ ``` -* **Also: `'isspace()'` checks for `'[ \t\n\r…]'`.** +* **Also: `'isspace()'` checks for `'[ \t\n\r\f\v…]'`.** Regex @@ -380,7 +380,7 @@ import re * **Use capital letter for negation.** ```python '\d' == '[0-9]' # Matches any digit. -'\s' == '[ \t\n\r\f\v]' # Matches any whitespace. +'\s' == '[ \t\n\r\f\v…]' # Matches any whitespace. '\w' == '[a-zA-Z0-9_]' # Matches any alphanumeric. ``` diff --git a/index.html b/index.html index 07c621c..a4d94ce 100644 --- a/index.html +++ b/index.html @@ -454,7 +454,7 @@ to_exclusive = <range>.stop

#Regex

import re
 <str>   = re.sub(<regex>, new, text, count=0)  # Substitutes all occurrences with 'new'.
@@ -484,7 +484,7 @@ to_exclusive   = <range>.stop
 
  • By default digits, whitespaces and alphanumerics from all alphabets are matched, unless 'flags=re.ASCII' argument is used.
  • Use capital letter for negation.
  • '\d' == '[0-9]'                                # Matches any digit.
    -'\s' == '[ \t\n\r\f\v]'                        # Matches any whitespace.
    +'\s' == '[ \t\n\r\f\v…]'                       # Matches any whitespace.
     '\w' == '[a-zA-Z0-9_]'                         # Matches any alphanumeric.