Regex not select word with character at the end
I have a simple question.
I need a regular expression to match a hexdecimal number without colon at the end.
For example:
0x85af6b9d: 0x00256f8a ;some more interesting code
// dont match 0x85af6b9d: at all, but match 0x00256f8a
My expression for hexdecimal number is 0[xX][0-9A-Fa-f]{1,8}
Version with (?!:)
is not possible, because it will just match 0x85af6b9
(because of the {1,8}
token)
Using a $
also isn’t possible – there can be more numbers than one
Thanks!
Read more here: Source link