How to find all the matching substrings in a particular line using Python? : I have several lines of text listing several instructions of a processor. I need to look for all the patterns of the form <x; y, z>. There could be two or more such patterns in each line. I want all the patterns in each set (the three digits within <> ) to be copied into a single list for further analysis.

I have tried using entries = re.findall("<[0-9]; [0-9],[0-9]>", line) ? 

I want the output like this for each line:

Output 

x, y, z, a, b, c (where all the entries are integer values)

However, this is not sufficient, what is the best way to implement what I want ?

Thansk 