I have these two strings...
var str1 = "this is (1) test";
var str2 = "this is (2) test";
And want to write a RegEx to extract what is INSIDE the parentheses as in "1"
and "2"
to produce a string like below.
var str3 = "12";
right now I have this regex which is returning the parentheses too...
var re = (/\((.*?)\)/g);
var str1 = str1.match(/\((.*?)\)/g);
var str2 = str2.match(/\((.*?)\)/g);
var str3 = str1+str2; //produces "(1)(2)"