hashtagAlphaNumeric top-level constant
String
const hashtagAlphaNumeric
This pattern captures characters that are typically present in hashtags.
It combines basic letters, marks, numerals, special characters, as well as their counterparts in the astral planes of Unicode, ensuring a comprehensive coverage.
The components that make up this pattern are:
$bmpLetterAndMarks
: Matches letters and marks from the Basic Multilingual Plane (BMP).$bmpNumerals
: Matches numerals from the BMP.$hashtagSpecialChars
: Matches special characters commonly used in hashtags.$nonBmpCodePairs
: Matches surrogate pairs representing non-BMP characters in UTF-16 encoding.$astralLetterAndMarks
: Matches letters and marks from the astral planes.$astralNumerals
: Matches numerals from the astral planes.
Implementation
const hashtagAlphaNumeric = r'(?:['
'$bmpLetterAndMarks$bmpNumerals$hashtagSpecialChars$hashtagEmoji'
r']'
'|(?=$nonBmpCodePairs)'
'(?:$astralLetterAndMarks|$astralNumerals))';