mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-01-22 14:29:16 +08:00
驯服正则表达式
This commit is contained in:
parent
f6a1fdbb58
commit
5f4e854f51
36410
adblock-for-dnsmasq.conf
36410
adblock-for-dnsmasq.conf
File diff suppressed because it is too large
Load Diff
36410
anti-ad-easylist.txt
36410
anti-ad-easylist.txt
File diff suppressed because it is too large
Load Diff
36410
anti-ad-surge.txt
36410
anti-ad-surge.txt
File diff suppressed because it is too large
Load Diff
@ -74,7 +74,7 @@ class addressMaker {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(preg_match('/^\|\|([0-9a-z\-\.]+[a-z]+)[\^\$]*([\~0-9a-zA-Z\.\-_]+,)?(image|third-party|script)(,.+)?$/', $line, $matches)){
|
||||
if(preg_match('/^\|\|([0-9a-z\-\.]+[a-z]+)\^(\$([^=]+?,)?(image|third-party|script)(,[^=]+)?)?$/', $line, $matches)){
|
||||
|
||||
if(substr($matches[1], 0, 4) == 'www.'){
|
||||
$row = substr($matches[1], 4);
|
||||
|
Loading…
Reference in New Issue
Block a user