Posted by windandwaves on 11/04/07 10:21
Hi Folk
I need to write a tricky replacement function.
C = replace A with B in C
C = replace D with E in C
examples of A could be "a cat climbs a tree", examples of B could be
"a dog climbs a alligator". Thereby, I want to make sure that parts
that have already been replaced will not be replaced again (by the E
replaces D statement for example). I will mark all new text (Bs and
Es) with <span class="replacePart">... new text here ....</span>.
How could I go about this? Could I use a regular expression?
Thank you
Nicolaas
[Back to original message]
|