title: How to match with optional occurence?
body: <p>For the construct <code>{123{a,b}}</code> I want to match <code>{123{</code> and <code>}}</code>.</p>
  
  <p>This is done by regex: <code>{(.*?){|}}</code></p>
  
  <p>BUT: now I want to use the same expression to run on <code>{a,b}</code> and match <code>{</code> and <code>}</code> only.</p>
  
  <p>Therefore I somehow have to make the 2nd <code>{</code> optional. But how?</p>
  
  <p>I'm using <a href="http://gskinner.com/RegExr/" rel="nofollow">http://gskinner.com/RegExr/</a> to test on the fly.</p>