\ba Unicode word boundary
Comment: Positive lookahead: Ensure a valid subdomain before username
Negative Lookahead(?!\w*__) \w*a Unicode word character, repeated any number of times
Comment: Disallow double underscores anywhere in the username
Negative Lookahead(?!\w*_{2,}) \w*a Unicode word character, repeated any number of times
_{2,}the literal _ (9510 / 1378 / 5F16) , repeated at least 2 times
Comment: Disallow underscores at the start or end of username
Non-Capturing Group(?:[a-z][a-z0-9_]{3,31}) a-zone character from a (9710) to z (12210) (case insensitive)
Character Class[a-z0-9_]{3,31} {3,31}matches between 3 and 31 characters from the set below:
a-zone character from a (9710) to z (12210) (case insensitive)
0-9one character from 0 (4810) to 9 (5710)
_the literal _ (9510 / 1378 / 5F16)
Comment: Username
Negative Lookbehind(?<!_) _the literal _ (9510 / 1378 / 5F16)
Comment: Disallow usernames ending with an underscore
\.the literal . (4610 / 568 / 2E16)
tthe literal t (11610 / 1648 / 7416) (case insensitive)
\.the literal . (4610 / 568 / 2E16)
methe literal text me (case insensitive) $end of line
Comment: Ensure it ends with ".t.me"