find mention in text and create anchor tag

Find a mention in text and create an anchor to that user.

preg_replace('((\@)[^ ]+)','\\0', $text);