I have below string:
<Total Slots :>
<8 (4-channel per CPU, 8 DIMM per CPU)>
<Capacity :>
<Maximum up to 1024GB RDIMM>
<Memory Type :>
<fd4 2933/2666/2400 /2133 RDIMM
bbh567 2933/2666/2400 /2133 LRDIMM>
<screen :>
<720>
<color :>
<blue>
<Memory Quality :>
<Certain 3452345tte READ
Non certain 7JJEN232 LREAD>
I want memory data (multiple captures) within Memory Type
and Memory Quality
like this:
Memory Type
Capture 1: 2933/2666/2400 /2133
Capture 2: 2933/2666/2400 /2133
Memory Quality
Capture 1: 3452345tte
Capture 2: 7JJEN232
If I use regex: Memory Type[\s\S]+?<(.+?)>
, it returns:
screen :
If I use regex: Memory Type[\s\S]+?<([\s\S]+?)>
, it returns:
fd4 2933/2666/2400 /2133 RDIMM
bbh567 2933/2666/2400 /2133 LRDIMM
I don't understand how do I create a regex that first captures the Memory
tag and then then the middle data.
I am using Python. Thank you.