title: reg exp match everything inside curly braces
body: <p>I have this php code and I want to match everything inside curly braces {}</p>
  
  <pre><code>$sentence= "This {is|or|and} a {cat|dog|horse} for a {kid|men|women}";
  preg_match("/\{.*?\}/", $sentence, $result);
  print_r($result);
  </code></pre>
  
  <p>But I get only this output:</p>
  
  <pre><code>Array ( [0] =&gt; {is|or|and} ) 
  </code></pre>
  
  <p>But what I need is a result like this:</p>
  
  <pre><code>Array ( [0] =&gt; is|or|and
  [1] =&gt; cat|dog|horse
  [2] =&gt; kid|men|women
   ) 
  </code></pre>
  
  <p>What regular expression should I use?</p>