Code :
$words = preg_replace("|[^\d\w ]+|i","",$words); The problem is that he removes not only punishment marks, but also Cyrillic !!!
Use it. works
$words = preg_replace("|[^\d\wа-яА-Я ]+|i","",$words); Or use the u modifier and pass the input string to UTF-8,
$words = preg_replace("|[^\d\w ]|iu","",$words); either look for the punctuation marks and delete them
$words = preg_replace("|[,.:;]+|","",$words); or list in the template and Cyrillic
$words = preg_replace("|[^\d\wа-я ]|i","",$words); Source: https://ru.stackoverflow.com/questions/623062/
All Articles