Hexadecimal Regular Expressions

Hopper can search for a given pattern in the bytes of a disassembled file. In order to proceed, Hopper uses a small language, very similar to regular expressions seen in tools like grep.

Regular expressions are made of words, using letters from the alphabet 0123456789abcdef, and special characters like *, +, ?, ., |, and parenthesis. From a regular expression, Hopper will build a deterministic finite automaton, and use it to search the pattern in the file. Each byte of the file is split into two 4-bits words, and given to the automaton.

Some examples