I have strings consisting of letters and numbers, like:
Ex1: "Phone 18020210 914 171 717 mailbox 43, 1003 Florvaag"
Ex2: "Phone 18020210 N 0914 171 717 mailbox 43, 1003 Florvaag"
Ex3: "Phone 18020210 N0914 171 717 mailbox 43, 1003 Florvaag"
I would like to find the numbers that occurs like "914 171 717" and "0210 914 171", eg. the nine digit number can either be preceded by a zero, or a space.
I tried this:
re.findall('[\s|0]\d{3}\s\d{3}\s\d{3}\s',Ex1)
But this expression only returns ['0210 914 171 '], while I would like it to return both numbers : ['0210 914 171 ','914 171 717']
It is probably a quick fix, but I couldn't figure out how to do it.