Seems to me that you've got what you want...
If I'm reading you right, you want to keep plural words plural and singular
words singular... so boys would become girls and boy would become girl.
Well... if you just replace boy with girl you get that result...
So I'm not seeing the problem... enlighten me? ;)
--Toby
----- Original Message -----
From: "Flint Doungchak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 14, 2001 10:24 PM
Subject: [PHP-WIN] String Replacement
> Hello all,
>
> Hope you all had a nice weekend. Simple question, I think.
>
> I would like to find all occurance of:
>
> boy or boys
>
> and replace it with:
>
> girl or girls
>
> respectively.
>
> My problem is that using the str_replace function like this:
>
> str_replace("boy","girl","$string");
>
> turns boys into girls.
>
> I guess I want an exact match or some fuzzy intelligent thing. Did I
explain
> myself well. This isn't so easy to write down.
>
> Thanks in advance. Take care.
>
> -Flint
>
>
> --
> PHP Windows 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]
>
>
--
PHP Windows 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]