title: Hashtag preg_replace
body: <p>I have a web app which is creating and linking to <code>#hashtags</code> and I have noticed that if someone creates a <code>#hashtag</code> of <code>#JB22</code> that the following code breaks. </p>
  
  <p>Is there away in the regex I can allow numbers at the end of a <code>#hashtag</code></p>
  
  <pre><code>$users = preg_replace("~(&lt;var data-type=\"user\" class=\"userHighlight\" id=\"(.*?)\"&gt;)(.*?)(&lt;/var&gt;)~", "&lt;_link&gt;$2|$3&lt;/_link&gt; ", $start);
  $tags = preg_replace("~(&lt;var data-type=\"tag\" class=\"tagHighlight\" id=\"(.*?)\"&gt;)#(.*?)(&lt;/var&gt;)~", "&lt;_link&gt;tag://$3|#$3&lt;/_link&gt; ", $users);
  $last = preg_replace("~(^|\\s)#(\\w*[a-zA-Z_]+\\w*)~", " &lt;_link&gt;tag://$2|#$2&lt;/_link&gt; ", $tags);
  </code></pre>