title: Find all PHP Variables with preg_match
body: <p>How can I find all PHP variables with <code>preg_match</code>. I made the following regular expression:</p>
  
  <pre><code>$string = 'Hallo $var. blabla $var, $iam a var $varvarvar gfg djf jdfgjh fd $variable';
  $instring = array();
  preg_match_all('/\$(.*?)/', $string, $instring);
  print_r($instring);
  </code></pre>
  
  <p>I just don't understand how regular expressions work.</p>