Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
imap regexp example for timg
>>> import re
>>> data = ['2 (X-GM-THRID 1391221299548167514 X-GM-MSGID 1391221299548167514 UID 6)']
>>>'X-GM-THRID (?P<X_GM_THRID>\d+) X-GM-MSGID (?P<X_GM_MSGID>\d+)', data[0]).groupdict()
{'X_GM_THRID': '1391221299548167514', 'X_GM_MSGID': '1391221299548167514'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.