驯服正则表达式

This commit is contained in:
gently 2019-12-19 23:28:12 +08:00
parent f6a1fdbb58
commit 5f4e854f51
4 changed files with 79708 additions and 29524 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -74,7 +74,7 @@ class addressMaker {
continue; 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.'){ if(substr($matches[1], 0, 4) == 'www.'){
$row = substr($matches[1], 4); $row = substr($matches[1], 4);