[nycphp-talk] Rewrite rule functionality
Dan Cech
dcech at phpwerx.net
Tue Mar 4 13:00:55 EST 2008
Urb LeJeune wrote:
>
>> The function you are looking for is preg_match
>>
>> http://php.net/preg_match
>
> preg_match only returns the entire match. To my knowledge you can not
> have a portion, enclosed in parenthesis, of the regular expression
> enclosed.
From the above url:
> If matches is provided, then it is filled with the results of
> search. $matches[0] will contain the text that matched the full
> pattern, $matches[1] will have the text that matched the first
> captured parenthesized subpattern, and so on.
If I understand your question correctly, this should be what you are after.
Dan
More information about the talk
mailing list