📅  最后修改于: 2022-03-11 14:54:38.050000             🧑  作者: Mango
$rows = file("problem.txt");
$blacklist = "foo|bar|lol";
foreach($rows as $key => $row) {
if(preg_match("/($blacklist)/", $row)) {
unset($rows[$key]);
}
}
file_put_contents("solved.txt", implode("\n", $rows));