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?
a-z. Just converting the names in the comment field, the way the site you're on right now does, is by far the easiest.XRegExplibrary.