The irregularity lies in the fact that you need to check the last name in which there can be Ukrainian letters. For example:

І і Ї ї Є є Ґ ґ

  • Check for what? - nikita_sergeevich
  • Does it fit the pattern - JL
  • Please give the first character of the Ukrainian alphabet in the unicode-escape sequence ( \u1234 ) and the last character of the alphabet. Also, just in case, give the same thing, but in upper case. - ReinRaus
  • um, trying to google - JL

2 answers 2

Make up the usual regular expression by typing the first and last characters of the Ukrainian alphabet.

 $resourse='123sdafdsaЄds'; preg_match_all('/[Є-Їa-zа-я]+/iu', $resourse, $result); var_dump($result); 

Result

 array(1) { [0]=> array(1) { [0]=> string(11) "sdafdsaЄds" } } 

    It is possible to simply add the missing characters to the regular Russian letters [/ ^ A-Ya-IІІЇїЄєҐґ]