title: How to extract values in between { } through regex?
body: <p>I am trying to extract value between <code>{ }</code> using </p>
  
  <pre><code>"\\(\\{[^}]+\\}\\)" 
  </code></pre>
  
  <p>regex in java. My input is </p>
  
  <pre><code>String text = "Hi this is {text to be extracted}."
  </code></pre>
  
  <p>I want output as </p>
  
  <pre><code>"text to be extracted" 
  </code></pre>
  
  <p>but that regex isn't working.</p>