Hi there and thank you for taking the time to look into this.
I'm working on a comment system and instead of using nested comments, I just want to add the @user method for replies.
So let's say for example I enter this comment:
@moonwalker: Thanks again for your reply.
I'm looking for a function to check if a word is starting with the character @ and after that changing the word into a link. The problem I'm facing is that people will use things like:
@moonwalker: rest of the message
@moonwalker, rest of the message
@moonwalker rest of the message
or even use en email address in their comments.
Is there a simple way to achieve this? Preg_match perhaps?
Thanks in advance for your help.