There is such a line. Всем привет 123 - this is the right one.
There is also such a string Hello world 78 - this is also the correct string.
And there is such a line. Как дела // is already a wrong line.
All these lines are written to a variable such as $text .
How can I use preg_match to check the variable $text for the presence of Latin or Russian letters and numbers?
Rummaged on the Internet and gathered here is, but it does not work.
preg_match('/[a-z0-9]+/i',$text) Help make up the expression.
preg_match('/^[a-zа-яё]+\h+[a-zа-яё]+\h+\d+$/ui',$text)- Wiktor Stribiżew