note 42167 modified in function.preg-match by aidan
| From: | aidan@php.net | Date: | Sun, 04 Jul 2004 16:21:40 +0000 |
| Subject: | note 42167 modified in function.preg-match by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72529@lists.php.net to get a copy of this message | ||
If you want to match all spanish characters (áéíóúÁÉÍÓÚñÑüÜ), this regexp could be
useful:
/^[a-zA-Z\xe1\xe9\xed\xf3\xfa\xc1\xc9\xcd\xd3\xda\xf1\xd1\xfc\xdc ]+$/
(keep it one line)
I got the hex values this way:
echo dechex(ord('á'));
--was--
If you want to match all spanish characters (áéíóúÁÉÍÓÚñÑüÜ), this regexp could be
useful:
/^[a-zA-Z\xe1\xe9\xed\xf3\xfa\xc1\xc9\xcd
\xd3\xda\xf1\xd1\xfc\xdc ]+$/
(keep it one line)
I got the hex values this way:
echo dechex(ord('á'));
http://php.net/manual/en/function.preg-match.php