{"id":15376576,"url":"https://github.com/mathiasbynens/hashtag-regex","last_synced_at":"2025-04-06T22:07:57.802Z","repository":{"id":57261686,"uuid":"86690423","full_name":"mathiasbynens/hashtag-regex","owner":"mathiasbynens","description":"A regular expression to match hashtag identifiers as per the Unicode Standard.","archived":false,"fork":false,"pushed_at":"2023-10-21T10:19:44.000Z","size":11,"stargazers_count":58,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T20:11:16.121Z","etag":null,"topics":["emoji","hashtag","regex","regexp","regular-expression","unicode"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathiasbynens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-30T10:31:28.000Z","updated_at":"2025-02-06T20:12:55.000Z","dependencies_parsed_at":"2024-06-18T14:08:24.076Z","dependency_job_id":"9dd6fb97-49a7-474f-a420-44187f396743","html_url":"https://github.com/mathiasbynens/hashtag-regex","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.06666666666666665,"last_synced_commit":"7de41907927dad311af20332d4570e5f40052cfc"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiasbynens%2Fhashtag-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiasbynens%2Fhashtag-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiasbynens%2Fhashtag-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiasbynens%2Fhashtag-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathiasbynens","download_url":"https://codeload.github.com/mathiasbynens/hashtag-regex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","hashtag","regex","regexp","regular-expression","unicode"],"created_at":"2024-10-01T14:08:11.819Z","updated_at":"2025-04-06T22:07:57.785Z","avatar_url":"https://github.com/mathiasbynens.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hashtag-regex [![Build status](https://travis-ci.org/mathiasbynens/hashtag-regex.svg?branch=master)](https://travis-ci.org/mathiasbynens/hashtag-regex)\n\n_hashtag-regex_ offers a regular expression to match hashtag identifiers [as per the Unicode Standard](http://unicode.org/reports/tr31/#hashtag_identifiers).\n\nThis repository contains a script that generates this regular expression based on the Unicode data. Because of this, the regular expression can easily be updated whenever the Unicode Standard changes.\n\n## Installation\n\nVia [npm](https://www.npmjs.com/):\n\n```bash\nnpm install hashtag-regex\n```\n\nIn [Node.js](https://nodejs.org/):\n\n```js\nconst hashtagRegex = require('hashtag-regex');\n// Note: because the regular expression has the global flag set, this module\n// exports a function that returns the regex rather than exporting the regular\n// expression itself, to make it impossible to (accidentally) mutate the\n// original regular expression.\n\nconst text = `\n#hashtag\n#©\n＃🤷🏿‍♀️ (\\uFF03\\u{1F937}\\u{1F3FF}\\u200D\\u2640\\uFE0F)\n`;\n\nconst regex = hashtagRegex();\nlet match;\nwhile (match = regex.exec(text)) {\n  const hashtag = match[0];\n  console.log(`Matched sequence ${ hashtag } — code points: ${ [...hashtag].length }`);\n}\n```\n\nConsole output:\n\n```\nMatched sequence #hashtag — code points: 8\nMatched sequence #© — code points: 2\nMatched sequence ＃🤷🏿‍♀️ — code points: 6\nMatched sequence ＃🤷🏿‍♀️ — code points: 6\n```\n\n## Author\n\n| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|\n| [Mathias Bynens](https://mathiasbynens.be/) |\n\n## License\n\n_hashtag-regex_ is available under the [MIT](https://mths.be/mit) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiasbynens%2Fhashtag-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathiasbynens%2Fhashtag-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiasbynens%2Fhashtag-regex/lists"}