I have a program returning data in the following format:
<CFData 0x1001219c0 [0x7fff7027aee0]>{length = 20, capacity = 20, bytes = 0x8deead13b8ae7057f6a629fdaae5e1200bcb8cf5}
I need to extract 8deead13b8ae7057f6a629fdaae5e1200bcb8cf5 (yes, minus the 0x). I tried using sscanf and passing some regular expressions but I have no clue on that.
Any idea how to do this? Code snippets are appreciated.
You could use strstr() to locate “bytes = 0x” in the input string and copy the remainder of the string (from the end of “bytes = 0x”) except for the last character: