Hashtag
ID hashtag
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Keyword marked with the # sign in social media posts and messages, used to group posts on one topic. It may contain letters of any script, digits and underscores, but no spaces or punctuation. X (Twitter) and Mastodon do not link a tag made only of digits, so the regexp requires at least one letter. Wikidata property P2572 stores hashtags without the # sign; the regexp requires it, because without it a hashtag is an ordinary word. Python matches letters of all scripts; the browser regexp engine matches only Latin letters, and neither matches combining vowel signs of Indic scripts.
- Categories
- Texts and articles, Internet
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Wikidata
- P2572
- Quality
- 90/100 · missing: detector coverage
- Metacrafter rules
- no detection rule yet
- Supported by tools
- no tool record lists this type yet
Regular expression
^#\w*[^\W\d_]\w*$
Python re syntax.
Examples
| Value | Description |
|---|---|
| #ww2 | World War II (Wikidata P2572) |
| #спорт | Sport, in Russian (Wikidata P2572) |
| #16 invalid | Digits only, not linked as a hashtag |
| #open data invalid | A space ends the hashtag |
Translations
| Language | Name | Description |
|---|---|---|
| Russian | Хештег | Ключевое слово со знаком # в публикациях социальных сетей. Состоит из букв, цифр и знаков подчёркивания, без пробелов; тег только из цифр не считается хештегом. |
Sources
- wikipedia: https://en.wikipedia.org/wiki/Hashtag
- wikidata: https://www.wikidata.org/wiki/Property:P2572
- doc: https://github.com/twitter/twitter-text/blob/master/conformance/extract.yml
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/hashtag - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/texts/hashtag.yamlon GitHub