I'm trying to extract hex number from this string (type str) :
mystring = b'\r\n+CUSD: 2,"062506460642063706270639002006270644062E062F06450629002006230639062F0020062706440625062A063506270644",72\r\n\r\nOK\r\n'
I tried:
hexnumber= m = re.findall(r'[0-9a-fA-F]+' , mystring)
print(hexnumber)
Output:
['b', 'C', 'D', '1', '0637064406280020063A064A0631002006450648062C0648062F000A002D0020002D0020002D000A00300030003A0627064406420627062606450629000A0030003A0631062C06480639', '72']
The output i'm looking for is :
0637064406280020063A064A0631002006450648062C0648062F000A002D0020002D0020002D000A00300030003A0627064406420627062606450629000A0030003A0631062C06480639