replace

I have a rtf textarea: brieftext
and I have a field: bedrijfsnaam

in the rftfield I have a tag (piece of text):
Now I want to replace the tag by the field. like this:

utils.stringReplace(brieftext,‘’,bedrijfsnaam)

But this isnt working, what am i doing wrong?

Sorry I mangled this post (disregard post below), but this should be correct.

  • david

Oops, Safari does some wierd things with this forum…trying this again with a different browser.

  • david

I use this:

brieftext = utils.stringReplace(brieftext, , bedrijfsnaam)…

Works like a charm…

David,

Which one is the best? To use the utils or work with regex like in your second example…

IT2BE:
David,

Which one is the best? To use the utils or work with regex like in your second example…

More control with the regex version. Just keep your regex cheat sheet handy. :)

  • david

OK, I will keep trying… I have been playing with regex a lot but avoid it if I can since I still struggle with it.

Very handy but very complicated :roll: