title: Getting content between curly braces in JavaScript with regex
body: <p>I am trying to get content between curly braces with JavaScript. I found this thread: <a href="https://stackoverflow.com/questions/413071/regex-to-get-string-between-curly-braces-i-want-whats-between-the-curly-braces">Regex to get string between curly braces &quot;{I want what&#39;s between the curly braces}&quot;</a></p>
  
  <p>But I do not know how to apply a regex like <code>/\{([^}]+)\}/</code></p>
  
  <p>I have tried <code>string.replace('/\{([^}]+)\}/','');</code>, however this does not work.</p>