Match
We learned about std::match_results. Now, we will look at one of the functions which allows us to send data to match_results.
std::regex_match
determines if the text matches a text pattern. We can further analyze the search results of type std::match_results
.
The code snippet below shows three simple applications of std::regex_match
: a C string, a C++ string and a range returning only a boolean. The three variants are available for std::match_results
objects respectively.
Get hands-on with 1400+ tech skills courses.