Avatar

Re: [[:cntrl:]]? (Bugs)

by Auge ⌂, Wednesday, February 03, 2010, 15:55 (5189 days ago) @ Urfin®

Hello

if(matches('тест')) echo 'matches!';
else echo 'doesn\'t match!';
?>[/code]
I also get "doesn't match!"

some info about web-server:
Operating system: Linux
Apache version: 2.2.12 (Unix)
PHP version: 5.2.10
MySQL version: 5.0.51a
MySQL encoding: UTF-8 Unicode (utf8)
Unicode collation: utf8_general_ci

...maybe it's better to change last option to utf8_unicode_ci?

The collation of the database table cell (i.e. utf8_general_ci vs. utf8_unicode_ci) is used for language dependent sorting of strings (considering of special chars like umlauts for sorting).

An explanation of regular expressions in SELFHTML (german language!) says for perls regular expressions (in PHP preg_*** functions), that /\w/ is the equivalence for alphanumerical chars, including "_" (for the latin writing system: /[a-zA-Z0-9_]/). Together with "u" (/\w/u) it should act for all unicode chars in any writing system, numbers and "_".

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread