Test, validate and match regular expressions
Matches Mastodon-style account handles like @user@mastodon.social, with an optional leading @ symbol. The username (group 1) allows letters, digits, dots, underscores, percent, plus, and hyphens, while the domain with TLD (group 2) must end in at least two letters. Case-insensitive matching handles both lowercase and uppercase, making it useful for extracting or validating federated social media handles in text.