$text = preg_replace('/(^|\s)#(\w*[A-Za-z-_]+\w*)/', '<a href="?query&search=$2">#$2</a>', $text);
Code (markup):
Sounds like an impossible task to tell it to differentiate between a real hashtag and something that is not.
What's even worse, if it finds...
Creating hashtags only, nothing else
from PHP http://ift.tt/295t9qB
via IFTTT
Out Of Topic Show Konversi KodeHide Konversi Kode Show EmoticonHide Emoticon