Answer the question
In order to leave comments, you need to log in
How to get chat id from conversation id using regular expression?
I decided to write a bot in VK through another library, but its problem is that through the group you can get the conversation ID (peer_id) there, but you can’t get the chat_id there, and I need the chat_id, I thought that this can be implemented through a regular expression, but I have no idea how to do it, because the peer_id changes and can be different, here are examples of what I need to get from:
>> 2000000003 > 3
>> 2000000179 > 179
>> 2000000080 > 80
>> 2000000147 > 147
Answer the question
In order to leave comments, you need to log in
Tin.
int('2000000179'[1:])
int('2000000003') - 2000000000
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question