Hi I am trying to replace words found in a string with a given value (case insensitive)
str = 'lemon lemontea Lemongrass lime';replaceword = 'lemon' %case insensitive
withthis = {'berry', 'apple', 'flower'};
Assume that we will be given with enough number of words to replace all the occurance of the word
I want to return this:
newstr = 'berry appletea flowergrass lime';
I tried to use strrep but it would replace for Lemon…
Best Answer