Answer the question
In order to leave comments, you need to log in
Strange result of the regular season, how to treat?
Greetings!
From the string you need to get all the words that are more than 3 characters long. I wrote a regular expression and displayed the result, and there questions, instead of some characters, and parts of words begin and end in strange places.
- Checked regular here https://regex101.com/r/MGYN0I/2
- File encoding utf-8.
- Checked the script on Windows and Linux.
What to do?
$string = "организация охраны 21 617";
preg_match_all("/[а-я]{4,}/i", $string, $keywords);
print_r($keywords);
Array
(
[0] => Array
(
[0] => ганиза�
[1] => ия
[2] => ан�
)
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question