Re: PCRE sub-expressions matching
- From: jens@xxxxxxxxxxxx
- Date: 31 Oct 2005 05:38:33 -0800
>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.
.
- References:
- PCRE sub-expressions matching
- From: jens
- Re: PCRE sub-expressions matching
- From: Joshie Surber
- PCRE sub-expressions matching
- Prev by Date: Re: PCRE sub-expressions matching
- Next by Date: Re: My function returns true but my code does not execute
- Previous by thread: Re: PCRE sub-expressions matching
- Next by thread: Re: mailing class
- Index(es):