Try this : $st = ereg_replace ("\+is", "and_is", $st);

you have to escape the + sign it mean other things then just literal

André Weidemann wrote:
> 
> The ereg_replace for some reason doesn't always work.
> I tried this:
> <HTLM>
> <BODY>
> <?
> $st = " This +is a test";
> $st = ereg_replace ("=+is", "and_is", $st);
> echo "$st";
> ?>
> </BODY>
> </HTML>
> 
> ..and got:
> REG_BADRPT in <b>/usr/local/httpd/htdocs/test.php</b> on line 5
> What is wrong and how can I do what I want to?
> 
> Thanx a lot in advance,
>  André.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to