I have a space delimited set of hex values and want to find /[0-9a-f]\{2\} unless the value is 00. For example, if the buffer is
00 00 00 00 18 00 00 00
the pattern should match the 18 but not the white space or the 00.
This can be done with the following regular expression:
\x\{2}\(00\)\@<!
Explanation:
\x: hex digit: [0-9A-Fa-f]\{2}: matches two of the preceding atom\(00\): an atom containing 00\@<! nothing, requires NO match behindFor more information, see:
:help pattern.txtIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With