JSFiddle - React, Tailwind, and code Playground
JavaScript
var txt = "I expect five hundred dollars {{$500}}. and new brackets {{$600}}";
var regExp = /\{([^)]+)\}/g;
var matches = txt.match(regExp);
for (var i = 0; i < matches.length; i++) {
var str = matches[i];
alert(str.substring(1, str.length - 1));
}