Hello Everyone!, My question is quite simple But a bit confusing:
For an example, Let's say I have this string:
var String = "123 Hi my name is ftk  > | I like to play  games  , I have 111 games on my PC."
As you can see above, The string has multiple symbols and multiple numbers as well, Now I want to replace every  to be empty or replaced by another word, So the output will be:
String = "123 Hi my name is ftk > | I like to play  games , I have 111 games on my PC."
Notice that neither
has been gone, But only <>, I just want to replace any word that matches my word 100% if that makes sense.
Thanks soo much in advance!
What I have tried:
I have tried 2 ways:
1- Using .relpace():
var String2 = String.replace("", "");
But this one removes everything included in the string, It'll remove 1, [, and ], And I only want to remove every word that looks exactly like the given one
2- Using global variable to remove all repeated one, Which is what I want, But same thing, It behaves like 1.
var String2 = String.replace(//g, "");
var String2 = String.replace(/""/g, "");