preg_match doesn't match Greek

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux