I have strings like
"ABCD_ABCD_6.2.15_3.2"
"ABCD_ABCD_12.22.15_4.323"
"ABCD_ABCD_2.33.15_3.223"
"6.2.15"
"12.22.15"
"2.33.15"
Another way would be this regex:
_(\d+.*?)_
import re
m = re.search('_(\\d+.*?)_', 'ABCD_ABCD_6.2.15_3.2')
m.group(1)