I want to extract hexadecimal number from a string. For example, the string is: OxDB52 Message 1 of orderid 1504505254 for number +447123456789 rejected by Operator
. I want to extract hexadecimal OxDB52
part. I know it can be done checking for 0x
in string.
But is there any cool pythonic way to extract hexadecimal number from string?