Reply to Re: setlocale and regular expressions

Your name:

Reply:


Posted by Daniel Tryba on 06/17/05 02:18

R <ruthless@poczta.onet.pl> wrote:
> if (preg_match('/^[a-z]{2,10}$/', 'aezztest'))
> ^^^^ wow google did some
> magic here ;-)
> polish characters
> meant to be here (in place of 'aezztest'

Just in case you didn't know: Google's G2 thingy is extremly borken.

> what ever ;-) the problem is that this regex isn't working...

That's because [a-z] matches is the equivalanet to [\x61-\x7a]

If you want to match lowercase extended characters in iso8859-2
encoding, you need to generate a character class like:
[\xb1\xb3\xb9-\xbc]
(and lots more I guess).

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация