I am currently learning javascript, and trying to automate a program that automatically detects unshortened acronyms and replaces it in a body of text. For example, let's say I want all "Lord of the Rings" phrases to be replaced with LotR.
I am trying
string = string.replace("the Lord of the Rings", "LotR");
but it doesn't seem to do anything. Maybe I should look into string.search() function instead, even if it seems to take more steps? Any help would be greatly appreciated!
stringhere? It should belet string = "the Lord of the Rings"