Shortest regex search and sum for integers
You can use map and sum. It good practice to use with statement when working with  a file.

with open('text.txt', 'r') as f:
    result = sum(map(int, re.findall(r'[0-9]+', f.read())))

print(result)