When a user posts a comment, I want to grab every word that starts with a @ symbol.
ex. string is 'Check this out @user1. It's a photo of @user2 and @user3.'
When I'm on the PHP side, I want to grab user1, user2, user3 so I can then notify those users that they have been tagged in this comment.
I tried playing with strpos, but closest I got was if the string started with @ using the logic below.
if (0 === strpos($string, '@')){ echo 'yes' }
but that wasn't what I needed.