Until ES6 support for unicode in a regular expression is implemented, you can work around this with some type of:
/@[^\s,]+/g
where you simply list material that may not be in user names. Next year
/@\w+/gu
To make sure you don’t get half the email addresses and other cases where the @ value is in the middle of the word, it should be match(/[^\s,@]*@[^\s,@]+(?=[\s,]|$)/g) , and then filter results starting with "@".
source share