$re = '/(\d+)\s(Yanvar|Fevral|Mart|Aprel|May|İyun|İyul|Avqust|Sentyabr|Oktyabr|Noyabr|Dekabr)/m';
$str = '1 Yanvar
2 Fevral
3 Mart
4 Aprel
5 May
6 İyun
7 İyul
8 Avqust
9 Sentyabr
10 Oktyabr
11 Noyabr
12 Dekabr';
$subst = "$1 \L$2";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php