You will probably want to change this to match whitespace either side of the 'mention' as it may match @ in the middle of text as well (e.g emails).