preg_match doesn't match Greek

From: Date: Tue, 01 Sep 2009 12:33:32 +0000
Subject: preg_match doesn't match Greek
Groups: php.general 
Request: Send a blank email to php-general+get-297539@lists.php.net to get a copy of this message
Hi gang, I am trying to make a form validation using preg_match and it fails. I think it is because the input is in Greek. I have made this script: $str = "ΕΕΝ 5196"; $pattern = "/^[[:alnum:]\s\-\,]*$/u"; echo '<pre>'; print preg_match($pattern,$str,$matches)."\n"; print_r($matches); to test preg_match's behavior and when the above string has Latin characters the pattern matches when it's in greek. Can someone explain this? Is there a workaround? PS all are in UTF-8. -- Thodoris

« previous php.general (#297539) next »