<? $regexp = '|^[A-Z]\.[A-Z]\.[A-Z]$|'; $word = 'W.W.W'; if(preg_match($regexp, $word)) echo('Тру'); else echo('Фалзе'); ?>