PCRE has very good utf-8 support. Simply add the /u modifier to your pattern.
preg_match('/non-utf-8 matching pattern/', $string);
preg_match('/utf-8 matching pattern/u', $string);
Expressions rationnelles
- Introduction
- Installation/Configuration
- Constantes pré-définies
- Exemples
- Fonctions POSIX Regex
- ereg_replace — >Remplacement par expression rationnelle
- ereg — Recherche par expression rationnelle standard
- eregi_replace — Remplacement par expression rationnelle insensible à la casse
- eregi — Recherche par expression rationnelle insensible à la casse
- split — Scinde une chaîne en un tableau, grâce à une expression rationnelle
- spliti — Scinde une chaîne en un tableau, grâce à une expression rationnelle
- sql_regcase — Prépare une expression rationnelle pour effectuer une recherche insensible à la casse
Daniel Klein ¶
1 year ago
Ray dot Paseur at Gmail dot com ¶
1 year ago
The POSIX functions are deprecated. Instead of the "ereg" collection you want to use something from the PCRE world.
http://www.php.net/manual/en/book.pcre.php
arekm ¶
1 year ago
If you switch to PCRE world functions note that pcre doesn't support UTF-8 well.
There are limitations - read "POSIX CHARACTER CLASSES" or "UNICODE CHARACTER PROPERTY SUPPORT" chapter at http://www.pcre.org/pcre.txt.
