Answer the question
In order to leave comments, you need to log in
How to remove an incomprehensible space character at the end of a word?
Broke my whole head. Parsed text passed through
trim(strtolower(preg_replace("/\s+/, "", $value)));
string(38) "среднеемедицинское "
string(36) "среднеемедицинское"
Answer the question
In order to leave comments, you need to log in
Are you sure that this character appears at the very beginning, and not somewhere after trim?
There is not one character, but two, as the output of var_dump()'ov directly tells you. The expression removes whitespace and nonprinting characters:preg_replace("/\s+|/, "", $value)
trim(strtolower(preg_replace_all("/[^.,:-а-яА-Я0-9a-zA-Z ]+/usi", "", $value)));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question