Hello.
There is a line:
var tpl = "<div>{title}</div> <div>{description}</div>"; and using regular season:
console.log(tpl.match(/\{[^\}]+\}/g)); i pull out of it
["{title}", "{description}"] and I need the variable names themselves, that is, like this:
["title", "description"] The question is: can this be done directly in a regular expression, or is it necessary to write a function, after which it will be cut off all this?