I need a regex to remove last expression between brackets (also with brackets)
source: input[something][something2] target: input[something]
I\'ve tried this, bu
try this code
var str = "Hello, this is Mike (example)"; alert(str.replace(/\s*\(.*?\)\s*/g, ''));