Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Python

r"
(?i)(https\:\/\/){1}((t\.me|telegram\.me)\/){1}(joinchat\/)?(([\+\_\-a-zA-Z0-9])+)$
"
mg

Description

You can use this regular expression to identify any type of Telegram link. It doesn't matter whether it is t.me or telegram.me.

Links including "joinchat" are also accepted.

Submitted by Telegram : T.me/TinyPY - a year ago (Last modified a year ago)