C: Regex library with MinGW

前端 未结 2 673
南方客
南方客 2020-12-31 19:00

How do I install a C regex into MinGW?

I\'m using its GCC... I\'m running Windows XP. I prefer an updated one.

2条回答
  •  遥遥无期
    2020-12-31 19:10

    You have a few options:

    • mingw-libgnurx from the user-contributed area of MinGW; from README:

      regex functionality from glibc 2.5 extracted into a separate library, for Win32

    • msys-regex; from the package description:

      Current versions are derived from the GNULIB implementation of the regex module, but an older version of the runtime derived from the venerable GNU regex library, with a slightly different interface, is available for legacy MSYS applications

    • pcre can be compiled with MinGW

    If you'd run MinGW cross-compiler on Fedora, libgnurx and pcre are in the repository, ready to use with MinGW.

    For those who use C++ Boost RegEx (which got into TR1) and QRegExp (from Qt) are also options.

提交回复
热议问题