I tried to use the following RegExp to escape the brackets and things inside. Here is the example string:
hjdsoghbesi (saeogbesor) serogberso ersberawsewf(edsrgb) sfdrobersb ouersber
I want the result code to be
hjdsoghbesi serogberso ersberawsewf sfdrobersb ouersber
I tried to use the following:
myString.replace(/\(.*\)/g,"")
However, this focused on the very first open bracket and the very last close bracket and gave me:
hjdsoghbesi sfdrobersb ouersber
How can I achieve the result that I wanted?
If you intend to answer, please tell me why your RegExp can achieve my purpose as I am unfamiliar with RegExp.