import re
#fh=open('regex_sum_42.txt')
#fh=open('regex_sum_202314.txt')
fh=open('regex_sum_202230.txt')
sum=0

for line in fh:
    fl=re.findall('[0-9]+',line)
    if len(fl) != 0 :
        for item in fl :
            sum += int(item)

print(sum)

31ed8ee8143f3d1a7a58b8ad10d6d1dc33123419
<mask token>

<mask token>
for line in fh:
    fl = re.findall('[0-9]+', line)
    if len(fl) != 0:
        for item in fl:
            sum += int(item)
print(sum)

<mask token>
fh = open('regex_sum_202230.txt')
sum = 0
for line in fh:
    fl = re.findall('[0-9]+', line)
    if len(fl) != 0:
        for item in fl:
            sum += int(item)
print(sum)

import re
fh = open('regex_sum_202230.txt')
sum = 0
for line in fh:
    fl = re.findall('[0-9]+', line)
    if len(fl) != 0:
        for item in fl:
            sum += int(item)
print(sum)

import re
#fh=open('regex_sum_42.txt')
#fh=open('regex_sum_202314.txt')
fh=open('regex_sum_202230.txt')
sum=0

for line in fh:
    fl=re.findall('[0-9]+',line)
    if len(fl) != 0 :
        for item in fl :
            sum += int(item)

print(sum)
