How can I retrieve the word my from between the two rounded brackets in the following sentence using a regex in JavaScript?
my
\"This is (my
You may also try a non-regex method (of course if there are multiple such brackets, it will eventually need looping, or regex)
init = txt.indexOf('('); fin = txt.indexOf(')'); console.log(txt.substr(init+1,fin-init-1))