[PHP] Replacing chars like: º OR ¿

2002-03-18 Thread andy
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

Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread Cameron Bales .:.
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. This grep pattern: [\x80-\xFF] will match any high byte

Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread Alexander Skwar
»andy« sagte am 2002-03-18 um 14:22:47 +0100 : 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.

Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread Alexander Skwar
»Rasmus Lerdorf« sagte am 2002-03-18 um 07:12:21 -0800 : $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 Yes. And to not get rid of the -, you need to specify it

Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread andy
so whats the difference between yours and : $filename = ereg_replace ([^a-z^0-9^/.^=^/-], , $filename); Andy Alexander Skwar [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... »Rasmus Lerdorf« sagte am 2002-03-18 um 07:12:21 -0800 : $new =

Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread Alexander Skwar
»andy« sagte am 2002-03-18 um 17:00:16 +0100 : so whats the difference between yours and : $filename = ereg_replace ([^a-z^0-9^/.^=^/-], , $filename); You've got quite some ^ to much in there, I'd think. If I understand it correctly, you'd also not remove the ^ character, because you've