2020-12-22

JavaScript - Extract the string between first set of curly brackets

let re = /{([^}]+)}/;

let matches = re.exec(str);

console.log(matches[1]);


No comments:

Post a Comment