$new = preg_replace('/[^a-z]/i','',$old); Note that this will also get rid of the - in this case since you specifically asked for something that got rid of everything not a-z
-Rasmus On Mon, 18 Mar 2002, andy wrote: > Hi there, > > I am still searching for a function which is replacing all chars not between > [a-z] for exampe a province name like: minºaqah-ash-shamal¿yah into valid > chars or just deleting them. There seems to be an endless amount of those > chars. > > Thanx for any hint, > > andy > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php