I have line
[0 +5] 23 for bucket [5 +5] 1 for bucket [25 +5] 22 for bucket [50 +5] 1
And using reqex I want result like
[('[0 +5]', '23'), ('[5 +5]', '1'), ('[25 +5] ','22'), ('[50 +5]', 1)]
but getting below result,
[('[50 +5]', '1')]
Used :
stats_iter = re.findall('(?:.*)(?:(\[.*\]) (\d+)).*', stat_log,re.DOTALL)
print(stats_iter)
.*at the end of the regular expression, the first match will continue matching to the end of the string.