How to choose only uppercase letters?

there is a list, OOO and a large portion of these names, well ver long

so far I have the current one solution, choose current title, someone can have another idea?

And the actual reason for the creation of a topic, I don't know how to make regular expression ))
where are you, kind and sympathetic person? help plz! )))
March 19th 20 at 08:44
2 answers
March 19th 20 at 08:46
March 19th 20 at 08:48
$str = 'ЛокоТехСервисСервисноеЛокомотивноедепосарептаподразделениеволгоград1филиалюжный';
$str = preg_replace('/[^A-ZА-Z]/u', ", $str);
echo $str;

Find more questions by tags PHP