From eb1ce43aa3d928dfd88455f5b9b41b7e3c926e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= Date: Sat, 5 Jan 2019 23:07:19 +0100 Subject: [PATCH] Fix DeprecationWarning: invalid escape sequence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mickaƫl Schoentgen --- crayons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crayons.py b/crayons.py index 5c68e0d..dc3d710 100644 --- a/crayons.py +++ b/crayons.py @@ -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')