Oct-13-2020, 03:42 PM
Hi guys,
Hoping somebody can help me here. I have a list of email messages and their UID's. I need to use re.findall() to select just the UID from the list.
The format of the input is:
Which is the 2nd occurrence of r' \d+'
How can I do this?
Hoping somebody can help me here. I have a list of email messages and their UID's. I need to use re.findall() to select just the UID from the list.
The format of the input is:
b' +OK 1 19 b' +OK 2 22 b' +OK 3 25 etc.Now, I can use this re to return the below format,
messageUID = re.findall(r'\d+ \d+',messageUID,0)[0]{msgNum UID}:
1 19 2 22 3 25 4 28 5 35However, I'm trying to retrieve just the UID (19, 22, 25, 28... etc)
Which is the 2nd occurrence of r' \d+'
How can I do this?