C 0x has std::regex, currently only VS2010 supports it and GCC (libstd ) does not support it
PCRE/PCRE is a relatively old C/C regular library, cross-platform
There is a regular library in glibc under Linux, directly include "regex.h"
You can use com to adjust the IRegExp2 regular interface of vbscript under windows. It is applicable to any version of windows. It does not require any additional dependencies and is very fast
There are also regular expressions in boost, but the boost library has too many things and is quite bloated
Under Linux, you can easily use the library provided by regex.h. I will post a piece of code first to show how RE is used in C language
, more roughly
I want to see if an email address matches the pattern I provided. This email address is
rrreeehhhericchd@gmail.com pattern is
You can use the regex library that comes with Linux.
It seems that there are only some third-party ones, Microsoft has one, and the boost one should be more versatile.
pcre is a famous regular library. PHP uses it
c 11<regex>
Eg:
See: http://www.codeceo.com/article/cpp11-regex-code.html