ThibH
12/4/2017 - 7:15 PM

Find matches in string with Regex

import re

p = re.compile(r'[A-Z]+')
p.findall('0123-ABCD-456')

>>> ['ABCD']