Answer the question
In order to leave comments, you need to log in
How to find hexadecimal numbers in a string?
A string is given that contains various text, including its hexadecimal numbers. How to find all these numbers in a string?
Any language is welcome. Well, or at least the algorithm of actions.
Answer the question
In order to leave comments, you need to log in
The easiest way is with a regular expression0x[\dA-Fa-f]+
There may be pitfalls here.
In arbitrary English text, there are some independent words that cover
the range 0x0..0xF and there will be false positives on articles: "a" and generally short
words like "cafe" which are technically perceived as a hex number.
Look up all the words that cover abcdef.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question