Datatypes › Texts and articles

Hashtag

ID hashtag

DatatypeNot PIIcategoricalDraft

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
100/100
Metacrafter rules
2 rules (1 by field name, 1 by value)
Supported by tools
metacrafter, Microsoft Recognizers-Text

Regular expression

^#\w*[^\W\d_]\w*$

Python re syntax.

Test a value

Examples

ValueDescription
#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

LanguageNameDescription
RussianХештегКлючевое слово со знаком # в публикациях социальных сетей. Состоит из букв, цифр и знаков подчёркивания, без пробелов; тег только из цифр не считается хештегом.

Sources

Use this record