0

Possible Duplicate:
php preg_replace with Unicode chars

I have tried to solve this myself but failed.

I need to "clean" my string using PHP preg_replace so every character except a-z, A-Z, 0-9, space (' ') and latin letters "ČčĆćĐ𩹮ž" are removed.

I have learned how to solve first part of my problem: $cleanstring = preg_replace('[^a-zA-Z0-9 ]', '', $originalstring);

But I'm not successful in including other latin letters in my pattern. I do not need all latin characters, just those listed above.

Edit: When my $originalstring is "Đak", my $cleanstring is "272ak"! How can I fix this?

Can anybody help? Thank you in advance!

milosh

4

0 回答 0