See https://gitlab.com/kibicat/mastodon/-/issues/13
# + not match if there is anything surrounding the mention, and
# + add named subgroup matches
# it would be ideal to explicitly refer to MENTION_RE, or a more fundamental regexp that we refactor MENTION_RE to incorporate
- ACCOUNT_STRING_RE = /^@?(?<username>#{Account::USERNAME_RE})(?:@(?<domain>[[:word:]\.\-]+[[:word:]]+))?$/i
+ ACCOUNT_STRING_RE = /^@?(?<username>#{Account::USERNAME_RE})(?:@(?<domain>[[:alnum:]\.\-]+[[:alnum:]]+))?$/i
class AccountFinder
attr_reader :username, :domain