twitter-text icon indicating copy to clipboard operation
twitter-text copied to clipboard

Is there a document explaining the tech spec of a hashtag?

Open hiteshsharma opened this issue 5 years ago • 2 comments

The regex is very long and is very hard to understand

hiteshsharma avatar Sep 01 '20 01:09 hiteshsharma

The main documentation for our parsing is here, however it doesn’t specifically call out hashtags. What are you interested in, whether or not a hashtag is just a term starting with a hash/pound character, or other things?

andypiper avatar Sep 01 '20 11:09 andypiper

When I see the regex, it seems there are rules for termination characters and there are some lookbacks as well. I was just interested in reading these rules somewhere rather than trying to parse that regex because I doubt I'll get it right if I simply start reading it. Even if the regex is straightforward, it might still be a good idea to pen down the rules and specification of a hashtag somewhere, similar to how character definition is explained in the doc that you shared.

hiteshsharma avatar Sep 01 '20 17:09 hiteshsharma