python – Regex for extracting different data formats

I was looking into this question, and trying to adapt the same problem. I have to extract all data inserted into a txt file. So far i have reached the following (barely readable) pattern

import re
pattern = r'(?

But alongside my text file there are some numbers being catched, for instance 29505 would be catched by the regEx, but I have been unsuccessful in fixing it so that 2,3,5 or more digit numbers are not considered. Any hints on what can I do? Is it easier to drop those on a post filter?

Read more here: Source link