mirror of
https://github.com/kennethreitz/crayons.git
synced 2026-06-05 15:00:18 +00:00
Fix DeprecationWarning: invalid escape sequence
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ class ColoredString(object):
|
||||
|
||||
|
||||
def clean(s):
|
||||
strip = re.compile("([^-_a-zA-Z0-9!@#%&=,/'\";:~`\$\^\*\(\)\+\[\]\.\{\}\|\?\<\>\\]+|[^\s]+)")
|
||||
strip = re.compile(r"([^-_a-zA-Z0-9!@#%&=,/'\";:~`\$\^\*\(\)\+\[\]\.\{\}\|\?\<\>\\]+|[^\s]+)")
|
||||
txt = strip.sub('', str(s))
|
||||
|
||||
strip = re.compile(r'\[\d+m')
|
||||
|
||||
Reference in New Issue
Block a user