UTF-8 and PCRE

From: Date: Tue, 18 Mar 2003 17:42:42 +0000
Subject: UTF-8 and PCRE
Groups: php.general 
Request: Send a blank email to php-general+get-140148@lists.php.net to get a copy of this message
Hello! I would appreciate if anybody could tell me how to use an utf8 encoded string in a regular expression. I have tried this $string = "a username written in greek letters"; preg_match('#^[\w][\w0-9_]{2,39}$#', $string); Which does not work, i have also tried to utf8_decode the string and pass it to the regex, which doesn't work either. I would appreciate if anybody could help me out here, i have searched the web but with no results. Thanks a lot in advance, Jürgen Hauser

« previous php.general (#140148) next »