Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-08 11:35:06 +0100:
>> Dick Jiang wrote:
>>> I think you'd better use regular expression to replace the word
>> agreed - only it a serious dive in the deep end of regexps - the OP may
>> have to use a negative lookahead assertion, something lik
# [EMAIL PROTECTED] / 2007-01-08 11:35:06 +0100:
> Dick Jiang wrote:
> > I think you'd better use regular expression to replace the word
>
> agreed - only it a serious dive in the deep end of regexps - the OP may
> have to use a negative lookahead assertion, something like:
>
> $string="avenue 1
g_replace("#\\bave(?!nue)#", "avenue", $string);
>
> Regards,
> Dick
> -Original Message-
> From: Kencana [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 08, 2007 5:12 PM
> To: php-general@lists.php.net
> Subject: [PHP] question about str
I think you'd better use regular expression to replace the word
Regards,
Dick
-Original Message-
From: Kencana [mailto:[EMAIL PROTECTED]
Sent: Monday, January 08, 2007 5:12 PM
To: php-general@lists.php.net
Subject: [PHP] question about str_replace function
Hi all,
I got a doubt
Hi all,
I got a doubt about the str_replace function.
the php code above will return me "avenuenue 1, avenue 1". i expect the
result will be "avenue 1, avenue 1". any idea of how can i get such result?
Thank you
Regards,
Kencana
--
View this message in context:
http://www.nabble.com/quest
I have a simple str_replace function that obviously has a syntax
problem. The [p] in the $find array ignores the brackets. Every "p" in
my text is replaced by a . Just for the heck of it, I've tried "
instead of ', and preg_replace(), etc.
$find= array('& ','W&OD', '"&"', chr(146), '[p]');
$
6 matches
Mail list logo