Re: [SMARTY] Capitalize and accented characters
| From: | Marcus Bointon | Date: | Thu, 18 May 2006 23:24:22 +0000 |
| Subject: | Re: [SMARTY] Capitalize and accented characters | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13433@lists.php.net to get a copy of this message | ||
On 16 May 2006, at 18:43, Osiris Pedroso wrote:
In some SW I wrote, I consider words to match the regexp "[a-zà-ü]", but I think capitalize is matching "[a-z]" only.It would be nicer to match something more general like [\w], if only there was a lower-case-only equivalent! I wonder if the unicode patterns would work even now? For example, [\p{Ll}] should match all lower case letters. Or perhaps you could convert the string to unicode before matching on it? Would be slower, but should be much more reliable. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture marcus@synchromedia.co.uk | http://www.synchromedia.co.uk