Flex is a lexical analyzer generator used for Wireshark’s display filters, some file formats, and other features.
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.
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.