AdGuard, AdGuard Wildcard : Fix Regex Don't work with |http$

This commit is contained in:
Minoplhy 2022-03-18 01:51:13 +07:00
parent cc594b2024
commit e0bddacaf1
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC
2 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,8 @@ outfile = sys.argv[2]
with open(infile) as f:
file = f.read().split('\n')
for i in range(len(file)):
file[i] = sub('\|http\$..*\|..*', '', file[i])
file[i] = sub('\|http\$..*', '', file[i])
file[i] = sub('((\|\||\@\@\|\|)..*(\/|\*(\-|\&|banner|..))..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|\?|\=|\;|\,|\$|\~)..*)|(..*(#|\$|\*)..*)|(^..*\$(app=|removeparam=|popup)..*)(\$..*)', '', file[i])
#print(file)
with open(infile, 'w') as f1:

View File

@ -9,6 +9,8 @@ outfile = sys.argv[2]
with open(infile) as f:
file = f.read().split('\n')
for i in range(len(file)):
file[i] = re.sub('\|http\$..*\|..*', '', file[i])
file[i] = re.sub('\|http\$..*', '', file[i])
file[i] = re.sub('((\|\||\@\@\|\|)..*(\/|\*(\-|\&|banner|..))..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|\?|\=|\;|\,|\$|\~)..*)|(..*(#|\$|\*)..*)|(^..*\$(app=|removeparam=|popup)..*)(\$..*)', '', file[i])
#print(file)
with open(infile, 'w') as f1: