title: matching a string using php preg_match
body: <p>I am stuck.</p>
  
  <p>I am trying to see if an textarea contains an #.</p>
  
  <p>This is what I am trying but it doesnt work.</p>
  
  <p>Example:</p>
  
  <pre><code>#firstname# - should trigger "processTaggedMessage"
  </code></pre>
  
  <p>whereas </p>
  
  <pre><code>firstname - should trigger "processNormalMessage"
  </code></pre>
  
  <p>The code (PHP):</p>
  
  <pre><code>(preg_match("^#(.*?)#$", $msg))
    ? $this-&gt;processTaggedMessage($fk_uid, $fk_cid, $sender, $msg, $num, $q)
    : $this-&gt;processNormalMessage($fk_uid, $fk_cid, $sender, $msg, $num, $q);
  </code></pre>
  
  <p>I am sure it is probs something simple but I cannot see it, I believe the regex is correct :S</p>
  
  <p>Thanks,</p>
  
  <p>Kyle</p>