Preg_match not working with Cyrillic in the template.. Why?

Hello friends. The second day puzzled why preg_match is not working?
setlocale(LC_ALL, 'ru_RU.UTF-8');
header('Content-Type: text/html; charset=utf-8');
$out = file_get_contents("http://vseigru.net/igry-testy/19701-igra-gadalka-na-kazhdyj-den.html");
//echo $out; 
preg_match("/

Play(.*)<\/h1>/u", $out, $tit); var_dump($tit);
Displays NULL.
If you do the pattern preg_match("/(.*)<\/h1>/u", $out, $tit); , it displays all the rules, but with str_replace the same problem... the Website donor to utf-8

July 9th 19 at 10:34
2 answers
July 9th 19 at 10:36
Works for me. Under var_dump($tit) do var_dump(preg_last_error());
Show that displays.
What is the encoding of the script?
July 9th 19 at 10:38
The script file is definitely in UTF-8 encoding?

Standard PSR-1 requires: Files MUST use only UTF-8 without BOM for PHP code.

Find more questions by tags Character encodingPHPRegular expressions