p = re.compile('([-+]?)(?:0?x)([0-9A-Fa-f]+)')
test_str = (
    'WA2\u0105\u0105-02 -7+12,7. -0x1AEfPq PP-.5P 0x1AEf +0x1AEf x0.6 words')
for x in re.findall(p, test_str):
    pass
Regular expressions in python