Is there a way to replicate this PHP snippet in JQuery or Javascript...
var str = '{Some groovy text}not so groovy text'; var regex = /\{(.*?)\}/; var value = str.match(regex)[1]; // 'Some groovy text';
This will retrieve the content within the brackets. Hope this helps.