Skip to content

FIX: lib/regexes.py update 'telegram_bot' regular expression.  #20

Description

@st1vms

I came along this repository by searching for a Telegram Bot API token regular expression. After checking the token format from a SO answer, i found a possible incorrectness in the 'telegram_bot' regex format.

In lib/regexes.py line 15:

change the regex from:

r'\d{9}:[0-9A-Za-z_-]{35}'

to:

r'^[0-9]{8,10}:[0-9A-Za-z_-]{35}$'

The line was last edited on this issue -> #15

The related SO answer ( which i also later adjusted ) is this https://stackoverflow.com/questions/61868770/tegram-bot-api-token-format

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions