Answer the question
In order to leave comments, you need to log in
PHP regular expressions?
There are lines: 128 129 129a 12A 12Vk1 12a 12k0str0
You need to get where only numbers or numbers and at the end one letter.
I am not familiar with regular expressions, please help.
Tried to write
if (preg_match("/^[(0-9){0,3}+(а-я{0,1})]+$/", $home["name"]))
. But that's not how it works. "/^\d+|\d+[а-я]?/"
skipping all the lines
Answer the question
In order to leave comments, you need to log in
if (preg_match("/^\d+[а-я]?$/iu", trim($home["name"])))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question