I am trying to export via a javascript string values within parentheses ().
example that works:
var a = "(test) (a b c)";
alert(a.match(/\([\s\S]+?\)/gi));//output: [(test),(a b c)]
But in some older browsers the “?” causes error.
So I did this:
var a = "(test) (a b c)";
alert(a.match(/\([A-Za-z0-9\-_\t\r\n\s]+\)/gi));
However this way not support foreign characters. Hence the need to use \S
I need a solution with \s\S and that do not use the ? signal.
You can match non-
)characters: