How to allow only Russian letters to be entered regularly? I tried it, it does not work /[а-я]/
|
1 answer
$text = 'Текст'; if (preg_match('/^[а-я]+$/iu', $text)) { echo 'Правильно'; } else { echo 'Неправильно'; } - It works) Thank you) and how to prohibit also the input of spaces? - Christine
- @Christina spaces in my example are prohibited. Only Russian letters - Manitikyl
- one@Manitikyl why do you have the
smodifier? - Edward - @ Edward cleaned up. - Manitikyl
|
/[А-Яа-я]+/- Let's say Pie