4.10. Flex

Flex is a lexical analyzer generator used for Wireshark’s display filters, some file formats, and other features.

Unix

Flex is available for most UNIX and UNIX-like platforms. See the next section for native Windows options.

If GNU flex isn’t already installed or available as a package for your platform you can get it at https://www.gnu.org/software/flex/.

After correct installation running the following

$ flex --version

should result in something like:

flex version 2.5.4

Your version string may vary.

Windows

A native Windows version of flex is available in the winflexbison3 Chocolatey package. Note that the executable is named win_flex.

PS:\> choco install winflexbison3

Native packages are available from other sources such as GnuWin. They aren’t officially supported but should work.