On Fri, Aug 01, 2003 at 03:13:53PM +0000, Curt Zirzow wrote:
> * Thus wrote messju mohr ([EMAIL PROTECTED]):
> > On Fri, Aug 01, 2003 at 10:33:50AM -0400, Anthony Ritter wrote:
> >
> > i would suggest preg_replace in favour to ereg_replace:
> > $newtext= preg_replace("!.*?(hello.*going).*!","$1",$text);
>
> Doesn't the $1 need to be escaped or in single quotes so php
> doesn't touch it.
sorry, i wanted to say '$1' and not "$1".
> $newtext= preg_replace("!.*?(hello.*going).*!","\$1",$text);
> or
> $newtext= preg_replace("!.*?(hello.*going).*!",'$1',$text);
>
> I cant test it at the moment.
>
> Thanks
>
> >
> > it is more powerfull, faster and widely available.
>
> I agree, I like now that PREC is now compiled by default.
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php