You are here: Re: tricky replace function « PHP Programming Language « IT news, forums, messages
Re: tricky replace function

Posted by Good Man on 11/06/07 20:55

windandwaves <nfrancken@gmail.com> wrote in news:1194381953.358772.178700
@q3g2000prf.googlegroups.com:

> Why is this so hard?
>
> I can do a str_replace. That is easy. However, I do many of them AND
> I want to make sure that one replacement does not override another...
>
> e.g.
> statement 1 could be: replace "cats" with "dogs"
> statement 2 could be: replaced "do" with "did"
>
> as you can see, this could turn "cats" into "didgs"
>
> That is what is the hard part.

then yes, go for regex so you can specify beginnings/ends of words as
opposed to characters in a string

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация