open_in_new
content_copy
>>> [a+b for a,b in re.findall('id_([a-z]+)|num([0-9]+)', s)] ['john', '847']