Prompt a regular expression. You must remove all characters except:
az AZ . ' - Prompt a regular expression. You must remove all characters except:
az AZ . ' - Like that:
$str = "AaBb ..'. - русский текст, 123456"; $str = preg_replace("/[^a-z'-.]/i", '', $str); echo $str; Conclusion:
AaBb ..'.-
If you need spaces, add a space in brackets.
Если нужны будут пробелы, добавьте \s в скобки. - bad advice for GAPS. - Visman\s space characters. - Visman pmSource: https://ru.stackoverflow.com/questions/778478/
All Articles