Posted by Chung Leong on 03/12/06 17:41
Janwillem Borleffs wrote:
> Toby Inkster wrote:
> > What if $str contained "\1"?
> >
>
> You probably mean "\\1", which will contain pattern matches grouped by
> parenthesis, but these will be ignored as preg_quote is used to escape the
> parenthesis when occurring in $needle.
Actually, \1 would end up being an empty string if the pattern doesn't
specify capturing.
Navigation:
[Reply to this message]
|