Escape square brackets in regex

pull/4/head
lundwall 4 years ago
parent 0982902902
commit 7f5e766d88
No known key found for this signature in database
GPG Key ID: DA69B6AD8B6D46A6

@ -48,10 +48,10 @@ fwp = re.sub('(?i)-Rakuv\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)-Scrambled\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)-Scrambled\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)-WhiteRev\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)-WhiteRev\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)-xpost\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)-xpost\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)[eztv]\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)\[eztv\]\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)[TGx]\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)\[TGx\]\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)[TGx]-xpost\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)\[TGx\]-xpost\.nzb$', '.nzb', fwp)
fwp = re.sub('(?i)[ettv]\.nzb$', '.nzb', fwp) fwp = re.sub('(?i)\[ettv\]\.nzb$', '.nzb', fwp)
if fwp: if fwp:
print('[NZB] NZBNAME=', fwp, sep='') print('[NZB] NZBNAME=', fwp, sep='')

Loading…
Cancel
Save