Namespaces
Variants
Views
Actions

Regular expressions library

From cppreference.com
< cpp
Revision as of 07:38, 29 May 2012 by Cubbi (Talk | contribs)

Template:cpp/regex/sidebar

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

Main classes

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

Template:cpp/regex/dcl list basic regexTemplate:cpp/regex/dcl list sub matchTemplate:cpp/regex/dcl list match results

Algorithms

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

Template:cpp/regex/dcl list regex matchTemplate:cpp/regex/dcl list regex searchTemplate:cpp/regex/dcl list regex replace

Iterators

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

Template:cpp/regex/dcl list regex iteratorTemplate:cpp/regex/dcl list regex token iterator

Exceptions

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

Template:cpp/regex/dcl list regex error

Traits

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

Template:cpp/regex/dcl list regex traits

Constants

Template:cpp/regex/dcl list syntax option typeTemplate:cpp/regex/dcl list match flag typeTemplate:cpp/regex/dcl list error type
Defined in namespace std::regex_constants