4.10. Flex

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

4.10.1. UNIX or Cygwin: flex

Flex is available for most UNIX-like platforms and as the flex package from Cygwin. 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 http://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.

4.10.2. Windows Native: Win flex-bison and flex

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

PS:\>choco install winflexbison

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