Simple, self-explanatory code snippets.
let regExp = /\{([^}]+)\}/;
let matches = regExp.exec('Now show {this}, and not (that).');
console.log(matches[1]);
No comments:
Post a Comment