note 60453 added to function.eregi
| From: | opedrosoatswoptimizerdotcom at osu1 dot php dot net | Date: | Sat, 07 Jan 2006 13:13:00 +0000 |
| Subject: | note 60453 added to function.eregi | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101355@lists.php.net to get a copy of this message | ||
I you are trying to match accented characters (e.g. you want to match "Café Olé"), you
can use the following regex:
"[a-zà-ü ]+"
This takes advantage of the fact that in the iso-8859-1 "Latin 1", the "à" is
the first accented char and the "ü", the last one.
By the way, the regex above will match this string as a single match:
"aeiou àèìòù áéíóú âêîôû ãõ ñ äëïöü ç"
Beware that your local code page may include a few more char codes in the range "[à-ü]",
so it may match more than you expect.
----
Manual Page -- http://www.php.net/manual/en/function.eregi.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60453
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60453&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60453&report=yes
Search -- http://master.php.net/manage/user-notes.php