Expand description
Transforms a hexagex – a regex written using hexadecimal – into a regex matching on the binary data.
The syntax is mostly the same as in the regex crate, but the literals have been replaced:
0-9,a-f: 4-bits sequences interpreted as base 16 numbers.: 4-bit wildcardO,I: 1-bit value corresponding to 0 and 1_: 1-bit wildcard^,$: these match the start and end of the text, not of the line\t: this is an escape to interprete the content immediately after it into a non-hexagex regular regex
Repetitions (* etc.), alternations (a | b) and groups ((a)) require their inner expressions
to have a multiple of bits, otherwise an error is generated.
Classes like [1-e] require all their elements to have the same number of bits.
Modules§
- regex_
bytes - Search for regex matches in
&[u8]haystacks.
Enums§
- Error
- An error from either the hexagex transformation process or the regex compilation itself
Functions§
- hexagex
- Convert the hexagex given in
hexagexinto a regex fromregex::bytesyou can use to match.