You are here: Re: PCRE sub-expressions matching « PHP Programming Language « IT news, forums, messages
Re: PCRE sub-expressions matching

Posted by jens on 10/31/05 15:38

>Without trying it (never knew you could name them <sheepish grin>) I
>would assume you could use (?:P<host>
Sadly not, because ?: effectively instruct the parser not to save the
subexpression match, so using it with the P option simply causes an
error (or nothing to be mached).

>On the other hand, however, does it really matter? Even if you are
>ooping, just do a quick test to see if the key is numeric
Sure, and i realize that it's probably not something I should worry
about until I sit down and do a real benchmark. Premature optimization
is an antipattern after all.

>Also, the url_parse function does what you are looking for, and will do
>it faster.
Granted, it only an example; Also i wanted slightly different behavior.

 

Navigation:

[Reply to this 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

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