7 | | If you want to match hex numbers ONLY, take into account that numbers are not normally stuck-in in the middle of some text but surrounded by spaces just like words. I would try, for example, {\s|=}{0[xX]}?[0-9a-fA-F]+?\s+ to match numbers between spaces (or right after an = sign) for starters. Then you can add punctuation signs, a decimal separator, other math operators, etc. |
| 7 | If you want to match hex numbers ONLY, take into account that numbers are not normally stuck-in in the middle of some text but surrounded by spaces just like words. I would try, for example, {\s|=}{0[xX]}?[0-9a-fA-F]+\s+ to match numbers between spaces (or right after an = sign) for starters. Then you can add punctuation signs, a decimal separator, other math operators, etc. |