When match digit in regex need be like this
Can test regex at regex101.
You can delete line 6 and change line 8 to this:
\d
and not d
alone.Can test regex at regex101.
You can delete line 6 and change line 8 to this:
if re.search(tofind, ed.stem):