Hello there,
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.
Hello there,
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.
STL (till C++0x) does not supports regular expressions. But you can use boost::regex library.
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.