title: regular expression non greedy matching
body: <p>I need a regular expression that matches the shortest string between "$" and  "|$"</p>
  
  <p>Example test string:</p>
  
  <pre><code>'bla bla$bla bla $bla bla|$bla bla bla'
  </code></pre>
  
  <p>regular expression:</p>
  
  <pre><code>/\$(.*?)\|\$/
  </code></pre>
  
  <p>i get</p>
  
  <pre><code>'bla bla $bla bla'
  </code></pre>
  
  <p>but i need 
  bla bla</p>
  
  <p>Has anyone an idea how to accomplish this?</p>