I have a list of shortcuts:
var shortcuts = ["efa","ame","ict","del","aps","lfb","bis","bbc"...
and a body of text of various capitalisation:
var myText = "Lorem ipsum... Efa, efa, EFA ...";
Is it possible to replace all the words in the text that match the shortcut list with a capitalised version of the shortcut using regex? Is it possible to do that without a loop only using String.prototype.replace()?
The desired outcome in my example would be:
myText = "Lorem ipsum... EFA, EFA, EFA ...";