<script> a='something([findthis(something'; regex= /(\[+([A-Za-z0-9])+)+/g; b=a.match(regex); document.write(b); </script>
var string = 'something([findthis(something', result = ( /\[(\w+)\(/.exec( string ) )[1]; alert (result);