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";

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.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to