title: PHP preg_match for Placeholder [@varname]
body: <p>Sorry for dropping an other <code>preg_match</code> regular expression question. I have been dealing with this issue for too long and can't get it to work, so any help is appreciated!!</p>
  
  <p>I need a simple preg_match_all to return me placeholder for the format <code>[@varname]</code>.</p>
  
  <p>in a string </p>
  
  <pre><code>"hello, this is [@firstname], i am [@age] years old"
  </code></pre>
  
  <p>I would expect an array with the values 'firstname' and 'age'.</p>
  
  <p>my attempt for <code>[varname]</code> that worked was: </p>
  
  <pre><code>preg_match_all("/[([^]]+)]/", $t, $result);
  </code></pre>
  
  <p>anything i tried to get the @character included failed... </p>
  
  <pre><code>preg_match_all("/[\@([^]]+)]/", $t, $result);
  </code></pre>