Get all @user mentions in a string.
$ npm install --save get-user-mentions
const userMentions = ;;//=> ['@michael', '@mark']
The string with usernames you want to search
Use these options to override the defaults
Removes duplicate names from the array of user mentions
Returns an array of names without the
- Currently, this module only supports usernames written in the latin unicode character sets. So english, latin, and most romance/european languages are covered. I am working on ways to support other languages.
- This module only searches for usernames that use the alphanumeric and underscore character conventions. This is not a bug, but you should be aware of this limitation if you are searching for unconventional usernames like
MIT © Michael Wuergler