PHP's preg_match() equivalent in C++?

c++, preg-match

Solution

`preg_match()` calls code from libPCRE. If you want the equivalent of `preg_match()`, then you must use that library.

Alternatively, if you just need the feature of regular expression matching (PCRE or not), there is also the `Boost::regex` library mentioned in another answer.

If your compiler supports the new versions of the standard (C++11 or later), then it probably also includes the new standard regular expression library. The Standard includes support for ECMAScript syntax (which is very similar to, and based on, PCRE) as well as a few others.

Problem

My question is simple. Is there a PHP's preg_match() function equivalent in the C++ STL? If not, can you tell me an alternative? Thanks.

Original source