From 7f5e766d884707d462ad7da8a524a3731aa27074 Mon Sep 17 00:00:00 2001 From: lundwall <23060984+lundwall@users.noreply.github.com> Date: Wed, 29 Jul 2020 15:10:17 +0200 Subject: [PATCH] Escape square brackets in regex --- NZBGet/scripts/Clean/Clean.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NZBGet/scripts/Clean/Clean.py b/NZBGet/scripts/Clean/Clean.py index 7636cba5a..3cbf93030 100644 --- a/NZBGet/scripts/Clean/Clean.py +++ b/NZBGet/scripts/Clean/Clean.py @@ -48,10 +48,10 @@ fwp = re.sub('(?i)-Rakuv\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)-Scrambled\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)-WhiteRev\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)-xpost\.nzb$', '.nzb', fwp) -fwp = re.sub('(?i)[eztv]\.nzb$', '.nzb', fwp) -fwp = re.sub('(?i)[TGx]\.nzb$', '.nzb', fwp) -fwp = re.sub('(?i)[TGx]-xpost\.nzb$', '.nzb', fwp) -fwp = re.sub('(?i)[ettv]\.nzb$', '.nzb', fwp) +fwp = re.sub('(?i)\[eztv\]\.nzb$', '.nzb', fwp) +fwp = re.sub('(?i)\[TGx\]\.nzb$', '.nzb', fwp) +fwp = re.sub('(?i)\[TGx\]-xpost\.nzb$', '.nzb', fwp) +fwp = re.sub('(?i)\[ettv\]\.nzb$', '.nzb', fwp) if fwp: print('[NZB] NZBNAME=', fwp, sep='')