note 60453 deleted from function.eregi by cmb

From: Date: Sun, 20 Oct 2019 08:38:44 +0000
Subject: note 60453 deleted from function.eregi by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212675@lists.php.net to get a copy of this message
Note Submitter: opedroso at swoptimizer dot com ---- 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.

« previous php.notes (#212675) next »