title: print out all strings between $ and *+2 characters in python
body: <p>i want to print out all substring in a string that has the following pattern +2 characters:
  for example get the substrings</p>
  
  <pre><code>$iwantthis*12
  $and this*11
  </code></pre>
  
  <p>from the string;</p>
  
  <pre><code>$iwantthis*1231  $and this*1121
  </code></pre>
  
  <p>in the monent i use</p>
  
  <pre><code> print re.search('(.*)$(.*) *',string)
  </code></pre>
  
  <p>and i get <code>$iwantthis*1231</code> but how can i limit the number of characters after the last pattern symbol * ?</p>
  
  <p>Greetings</p>