我有一个文本文件,其中包含许多行随机英文字母。我想检查哪些行包含我要查找的字母。例如,我有以下文本行:
pwieuthvngbcdxz
iaefonmlkjghbcd
plmujhytrgvdsea
我想知道是否有任何行包含以下字母:abcdefghijklmno,不以任何顺序,所以结果将是第 2 行:iaefonmlkjghbcd
到目前为止,我只有读取文本文件行的部分:
$handle = fopen("randomletters.txt", "r");
if ($handle) {
while (($line = fgets($handle)) !== false) {
//does $line contain the letters I'm looking for? if yes print the line
}
}
慕娘9325324