Regular expression to find string inside curly brackets while keeping curly brackets : <p>Hi I am only starting out with Regexs, and am trying to write a regular expression to find string inside curly brackets while keeping curly brackets</p>

<pre><code>Text: "This is a {nice} text to search for a {cool} substring".
Answer I want: {nice} and {cool}
</code></pre>

<p>I have already looked through the answer here:
<a href="https://stackoverflow.com/questions/30483613/regular-expression-to-find-string-inside-curly-brackets-javascript">Regular expression to find string inside curly brackets Javascript</a></p>

<p>This almost does what I want, except that it only returns what's inside the curly brackets. I want to keep the curl brackets.</p>
