node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป


Detect Hashtags

Travis CI Test Status

Get an array of hashtags extracted from a string.


var findHashtags = require('find-hashtags');

console.log(findHashtags('This #text contains a number of #useful hashtags'));
// ['text', 'useful']

The function returns an array containing the hashtags found within a string. It only matches letters and numbers as components of a hashtag.