Re: preg for unicode strings?

From: Date: Sun, 06 Nov 2005 01:11:04 +0000
Subject: Re: preg for unicode strings?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-225199@lists.php.net to get a copy of this message
Andy, you might want to check out http://www.regular-expressions.info/unicode.html Please note two things while using the described syntax: 1. You have to additionally use the u modificator. 2. While \p{Ll} for instance works in PHP, \p{Lowercase_Letter} doesn't. Regards, Niels > Hi List > > I am doing some data validation and the following regexp fails > > [\W] > > When using characters like £ or € > > Obviously because they are technically more then one character, even > though they are only displayed as one. > > The script is encoded in UTF-8 > > Anybody know a fix for this? > > With kind regards > > > Andy

« previous php.general (#225199) next »