Re: str_ireplace() for php4?




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.

.



Relevant Pages

  • Re: str_ireplace() for php4?
    ... Toby Inkster wrote: ... but these will be ignored as preg_quote is used to escape the ... parenthesis when occurring in $needle. ...
    (comp.lang.php)
  • Re: Cant Get Basic Script to Work
    ... Janwillem Borleffs wrote: ... use it without the parenthesis. ... Javascript to evaluate that expression. ... results in an error and the default (unless you use try/catch ...
    (comp.lang.javascript)