Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: michaelsloweyIs there any way to replace multiple exact occurences of a word within a string.
For example
I want to replace "NO" here with "YES"
emit "NO I AM GOING NORTH".replace("NO","YES") as text
The emitted out put becomes "YES I AM GOING YESRTH"
I could use...
emit "NO I AM GOING NORTH".replace("NO ","YES ") as text
But that would also replace "NO" at the end of words (eg "BONO") and not replace "NO" at the end of a piece of text (eg "THIS SIGN SAYS NO")