Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/regex"

From cppreference.com
< cpp
(Added a brief descriptioon of the library itself.)
(link)
Line 2: Line 2:
 
{{cpp/regex/sidebar}}
 
{{cpp/regex/sidebar}}
  
The regular expressions library provides an object to represent a regular expression[http://en.wikipedia.org/wiki/Regular_expression], which is a kind of mini-language used to represent pattern matching within strings, a set of algorithms to apply the regular expression to target strings, and a set of helper classes associated with using the results of the application of the regular expression to those target strings.
+
The regular expressions library provides an object to represent a [[enwiki:Regular expression|regular expression]], which is a kind of mini-language used to represent pattern matching within strings, a set of algorithms to apply the regular expression to target strings, and a set of helper classes associated with using the results of the application of the regular expression to those target strings.
  
 
===Main classes===
 
===Main classes===

Revision as of 01:10, 19 March 2012

Template:cpp/regex/sidebar

The regular expressions library provides an object to represent a regular expression, which is a kind of mini-language used to represent pattern matching within strings, a set of algorithms to apply the regular expression to target strings, and a set of helper classes associated with using the results of the application of the regular expression to those target strings.

Contents

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)
(C++11)
identifies a sub match in the analyzed string
(class template)
identifies all matching results
(class template)

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)
check if a regular expression occurs anywhere within a string
(function template)
replace occurrences of a regular expression with some other text
(function template)

Iterators

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


(class template)

(class template)

Exceptions

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


(class)

Traits

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


(class template)

Constants

Defined in namespace std::regex_constants

(typedef)

(typedef)

(typedef)