I\'d like to remove all numbers from a string [0-9]. I wrote this code that is working:
$words = preg_replace(\'/0/\', \'\', $words ); // remove numbers
$wor
For Western Arabic numbers (0-9):
$words = preg_replace('/[0-9]+/', '', $words);
For all numerals including Western Arabic (e.g. Indian):
$words = '१३३७';
$words = preg_replace('/\d+/u', '', $words);
var_dump($words); // string(0) ""
\d+
matches multiple numerals./u
enables unicode string treatment. This modifier is important, otherwise the numerals would not match.