note 68974 deleted from function.preg-match by tularis

From: Date: Thu, 03 Jul 2008 21:39:20 +0000
Subject: note 68974 deleted from function.preg-match by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141147@lists.php.net to get a copy of this message
Note Submitter: Izzy ---- Concerning the German umlauts (and other language-specific chars as accented letters etc.): If you use unicode (utf-8), you can match them easily with the unicode character property \pL (match any unicode letter) and the "u" modifier, so e.g. <?php preg_match("/[\w\pL]/u",$var); ?> would really match all "words" in $var - whether they contain umlauts or not. Took me a while to figure this out, so maybe this comment will safe the day for someone else :-)

« previous php.notes (#141147) next »