Sorry, this sounds very basic, but I really can't find on Google.
In order to replace contents in a string globally, you can use things like...
a.replace(/blue/g,'red')
But sometimes you need to replace characters that's not compatible with the example above, for example, the character ")"
So, this will fail...
const a ="Test(123)"
a = a.replace(/(/g, '')
VM326:1 Uncaught SyntaxError: Invalid regular expression: /(/: Unterminated group
How to replace string of characters like that ? at :1:7