cpp/regex

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.


 * Pattern. This is the regular expression itself. It determines what constitutes a match. It is an object of type std, constructed from a string with special syntax. See std for the description of supported syntax variations.


 * Matched array. The information about matches may be retrieved as an object of type std.


 * Replacement string. This is a string that determines how to replace the matches, see std for the description of supported syntax variations.

Main classes
These classes encapsulate a regular expression and the results of matching a regular expression within a target sequence of characters.

Algorithms
These functions are used to apply the regular expression encapsulated in a regex to a target sequence of characters.

Iterators
The regex iterators are used to traverse the entire set of regular expression matches found within a sequence.

Exceptions
This class defines the type of objects thrown as exceptions to report errors from the regular expressions library.

Traits
The regex traits class is used to encapsulate the localizable aspects of a regex.