Is there a way to replicate this PHP snippet in JQuery or Javascript...
Is this what you need?
var value = "some {example}"; value.match(/{([^}]+)}/); //array[0] = "{example}" --- array[1] = "example"