Reply to Re: Combining 2 preg matches.

Your name:

Reply:


Posted by Chung Leong on 07/16/06 16:09

Rik wrote:
> It just occured to me that, allthough a wonderfull example:
>
> $regex ='/^(?:[a-z]|[a-z][_\-][a-z])+$/';
>
> ...will do just fine.
>
> equally so:
> $regex ='/^(?:[a-z]+(?:[_\-][a-z]+))+$/';
>
> Lookahead & -behind are unneccessary in this case, and this keep it simple.

Good point. It doesn't make sense to use assertions when you'll capture
the matches anyway.

[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

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