I would like to know how I can sum up the integers of text1+text2+text3 from a text file, but if text2 and/or text3 doesnt exist after text1 then I get the integer from text1 only and look for the next text2 and/or text3 after text1.
example textfile:
text1:102
text2:123
text3:1432
text1:12
text1:34324
text3:234234
Desired output:
102+123+1432
12
34324+234234
or
1657
12
268558
I am not too sure how to get this integer value and store it.