Regular expressions library

From cppreference.com
< cpp
Jump to: navigation, search

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.

Also provided in the regular expressions library are utility classes that provide support for various algorithms, iterators, exceptions, and type traits.

Contents

[edit] Main classes

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

regular expression object
(class template) [edit]
(C++11)
identifies a sub match in the analyzed string
(class template) [edit]
identifies all matching results
(class template) [edit]

[edit] Algorithms

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

try to match a regular expression with a complete string
(function template) [edit]
check if a regular expression occurs anywhere within a string
(function template) [edit]
replace occurrences of a regular expression with some other text
(function template) [edit]

[edit] Iterators

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


(class template) [edit]

(class template) [edit]

[edit] Exceptions

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


(class) [edit]

[edit] Traits

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


(class template) [edit]

[edit] Constants

Defined in namespace std::regex_constants
general options controlling regex behavior
(typedef) [edit]
options specific to matching
(typedef) [edit]
describes different types of matching errors
(typedef) [edit]

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox