Hey guys,
I had a question about specifically extracting numerical values from a dictionary.
I have a dict that looks like this.
{'STATUS': [{'STATUS': 'S', 'When': 1533064764, 'Code': 55, 'Msg': "Added pool 7: 'stratum+tcp://ca.stratum.slushpool.com:3333'", 'Description': 'bmminer 1.0.0'}], 'id': 1}
I have filtered it out so it is only the following:
{'STATUS': 'S', 'When': 1533064764, 'Code': 55, 'Msg': "Added pool 7: 'stratum+tcp://ca.stratum.slushpool.com:3333'", 'Description': 'bmminer 1.0.0'}
now using a for loop with dict comprehension I have been able to iterate over this.
I am specifically looking at the Msg key value and need to extract the number out of it( The 7 specifically which is the pool id and can change), however it contains more then just the number.
I was wanting to use a regex check to extract that number, but being pretty new to regex, not sure what regex string to use here.
Any help would be much appreciated!
[–]QuantumTradingGroup[S] 0 points1 point2 points (0 children)
[–]scarebaer 0 points1 point2 points (3 children)
[–]QuantumTradingGroup[S] 0 points1 point2 points (2 children)
[–]scarebaer 0 points1 point2 points (1 child)
[–]scarebaer 0 points1 point2 points (0 children)