I am trying to write a regular expression which returns a string which is between parentheses. For example: I want to get the string which resides between the strings \"(\"
Ported Mr_Green's answer to a functional programming style to avoid use of temporary global variables.
var matches = string2.split('[') .filter(function(v){ return v.indexOf(']') > -1}) .map( function(value) { return value.split(']')[0] })