meson: Extract flex version using a regex inside a script
Different builds of Flex on different platforms output different strings in
--version. For example:
flex 2.5.35 Apple(flex-31)
C:\Program Files (x86)\GnuWin32\bin\flex.EXE version 2.5.4
We need to look for a string that looks like a version, which means a regex till https://github.com/mesonbuild/meson/issues/1609 is fixed.
Fixes #356 (closed).