Test, validate and match regular expressions
Matches Telegram message URLs across official domains (t.me, telegram.org, telegram.me, telegram.dog), with optional protocol and www prefix. Captures either a private chat ID (c/123456 format) or a public username (enforcing Telegram's rules: starts with a letter, no consecutive underscores), plus optional thread ID and required message ID via named capture groups. Useful for validating and extracting Telegram links in chat apps, link previewers, or content moderation tools; the multiline and global flags process many URLs in bulk text.