I want to match all mentioned users in comment. Example:
var comment = '@Agneš, @Petar, please take a look at this';
var mentionedUsers = comment.match(/@\w+/g);
console.log(mentionedUsers)
I'm expecting ["@Agneš", "@Petar"]
but getting ["@Agne", "@Petar"]
. As you can see š
symbol is not matched.
How can I match all letter symbols include non-ascii?