Reply to Regular Expression: How the rule is applied for the Pattern '/((red|white) (king|queen))/'

Your name:

Reply:


Posted by mosesdinakaran@gmail.com on 01/22/08 11:41

Can any one explain how the rule is applied for the following Regular
expression

$Str = 'the red king';

$Pattern = '/((red|white) (king|queen))/';

preg_match($Pattern,$Str,$Val);

Result:

Array
(
[0] => red king
[1] => red king
[2] => red
[3] => king
)

Thanks in Advance
Moses

[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

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