How to remove none-characters and digits from a string?
Posted: Fri Oct 19, 2007 8:34 pm
Hi people
I have a string that could contain any character (from any language).
I would like to remove all non-characters and digits from it.
I could use:
however this will only work for strings with English characters.
I am looking for a solution that will also work for example in German, Chinese and so on.
Does anyone know of such a solution?
regards
I have a string that could contain any character (from any language).
I would like to remove all non-characters and digits from it.
I could use:
Code: Select all
$new_string = ereg_replace("[^A-Za-z0-9]", "", $string);I am looking for a solution that will also work for example in German, Chinese and so on.
Does anyone know of such a solution?
regards