I am currently starting with regex and try to understand some commands. One problem I stumbled upon is that I can use a positive lookahead like
asdaf = re.compile(r'[1-9](?=u)')
asdaf.findall("rm4m3455ukdfr6i")
which results in:
['5']
So far so good. However, if extend the numbers to more then one
bsdaf = re.compile(r'[1-9]*(?=u)')
bsdaf.findall("rm4m3455ukdfr6i")
I get this list
['3455', '']
Can someone explain why there is a second empty entry in the list and how to avoid this second entry?
Thanks in advance!