Would it be possible to change
Hello, this is Mike (example)
to
Hello, this is Mike
using JavaScript with
Try / \([\s\S]*?\)/g
Where
(space) matches the character (space) literally
\( matches the character ( literally
[\s\S] matches any character (\s matches any whitespace character and \S matches any non-whitespace character)
*? matches between zero and unlimited times
\) matches the character ) literally
g matches globally
Code Example:
var str = "Hello, this is Mike (example)";
str = str.replace(/ \([\s\S]*?\)/g, '');
console.log(str);
.as-console-wrapper {top: 0}