Does C or C++ have a standard regex library?

aviraldg picture aviraldg · Sep 14, 2009 · Viewed 17.1k times · Source

Does it? If yes, where can I get the documentation for it... if not, then which would be the best alternative?

Answer

Joris Timmermans picture Joris Timmermans · Sep 14, 2009

C++11 now finally does have a standard regex library - std::regex.

If you do not have access to a C++11 implementation, a good alternative could be boost regex. It isn't completely equivalent to std::regex (e.g. the "empty()" method is not in the std::regex) but it's a very mature regex implementation for C++ none the less.