I have a string e.g. My column name is Start Date (GMT)
I want to replace Start Date (GMT) portion with start_date.
I am trying to do it like:
let a= "My column name is Start Date (GMT)";
let b = "Start Date (GMT)";
let str = new RegExp(b,"g");
console.log(a.replace(str,"start_date"));
With same code I am able to replace the string with desired value if brackets are not there, but since bracket '(' is there it is not able to identify the string and replace it.