note 95827 deleted from ref.pcre by danbrown

From: Date: Sun, 24 Jan 2010 18:17:42 +0000
Subject: note 95827 deleted from ref.pcre by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165255@lists.php.net to get a copy of this message
Note Submitter: cebelab at gmail dot com ---- I noticed that in order to deal with UTF-8 texts, without having to recompile php with the PCRE UTF-8 flag enabled, you can just add the following sequence at the start of your pattern: (*UTF8) for instance : '#(*UTF8)[[:alnum:]]#' will return TRUE for 'é' where '#[[:alnum:]]#' will return FALSE found this very very useful tip after hours of research over the web directly in pcre website right here : http://www.pcre.org/pcre.txt there are many further informations about UTF-8 support in the lib hop that will help! -- cedric

« previous php.notes (#165255) next »