文字列に特定の単語がほとんど含まれていないことを確認したい。
4bored4,4blur4,4blingeye4,4bathing4,4congratz4,4crisp4,4curse4、空白とドット。
これが私のコードです
$s = '...... 4crisp4 4crisp4 4crisp4';
preg_match('/^[4bored4|4blur4|4blingeye4|4bathing4|4congratz4|4crisp4|4curse4| |\.]+$/',$s,$m);
しかし、これで失敗しました $s = 'hahahha 4crisp4 4crisp4 4crisp4'; このハハハ語を含む文字列がこのパターンで問題ないのはなぜですか?
この文字列に特定の単語、ドット、空白がない場合は、リターンに失敗したいと思います。