Regular expressions library

From Cppreference

< cpp
Jump to: navigation, search

Contents

[edit] Main classes

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

basic_regex (C++11)
regular expression object
(class template)
sub_match (C++11)
identifies a sub match in the analyzed string
(class template)
match_results (C++11)
identifies all matching results
(class template)

[edit] Algorithms

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

regex_match (C++11)
try to match a regular expression with a complete string
(function template)
regex_search (C++11)
check if a regular expression occurs anywhere within a string
(function template)
regex_replace (C++11)
replace occurrences of a regular expression with some other text
(function template)

[edit] Iterators

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

regex_iterator (C++11)

(class template)
regex_token_iterator (C++11)

(class template)

[edit] Exceptions

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

regex_error (C++11)

(class)

[edit] Traits

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

regex_traits (C++11)

(class template)

[edit] Constants

Defined in namespace std::regex_constants
syntax_option_type (C++11)

(typedef)
match_flag_type (C++11)

(typedef)
error_type (C++11)

(typedef)