Regular expressions library (since C++11)
From cppreference.com
< cpp
The regular expressions library provides a class that represents regular expressions, which are a kind of mini-language used to perform pattern matching within strings. Almost all operations with regexes can be characterized by operating on several of the following objects:
- Target sequence. The character sequence that is searched for a pattern. This may be a range specified by two iterators, a null-terminated character string or a std::string.
- Pattern. This is the regular expression itself. It determines what constitutes a match. It is an object of type std::basic_regex, constructed from a string with special grammar.
- Matched array. The information about matches may be retrieved as an object of type std::match_results.
- Replacement string. This is a string that determines how to replace the matches.
Contents |