For instance,
var str = '<a href="one">foo</a> <a href="two">bar</a> ...';
var reg = /href\="([^"]*)"/g;
console.log(str.match(reg));
will output [ 'href="one"', 'href="two"' ]
but i want [ 'one', 'two' ] (only the value between the parenthesis in the reg).
Is it possible directly from a function in JavaScript without writing tone of codes ?