Reply to Re: Combining 2 preg matches.

Your name:

Reply:


Posted by Chung Leong on 07/17/06 16:33

Rik wrote:
> Ah, forgot that in [a-z0-9][_\-][a-z0-9] the character on the right is
> already matched, so it won't work as a start for the second _ in _a_....

You know, I thought that was the problem initially, but then remembered
that the regular expression engine does backtracking in order to
maximise any match. When it encounters the underscore after assigning
the letter to the first subpattern, it's supposed to abandon the
previous match, backtrack to the letter, and go down the second branch.

[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

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