Use the sscanf function,
See following char array in C,
char array = “My Message: 0x7ffff6be9600”
To extract the value "0x7ffff6be9600" only from above char array. Try this one: unsigned long l; if (3 == sscanf(array, "%*s %*s %lx", &l)) //ignore the words before the number. I hope this will help you!!