Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/regex"

From cppreference.com
< cpp
m (Text replace - "{{mark c++0x}}" to "{{mark c++11}}")
(Fleshed out traits and exceptions and added a descriptive paragraph for each section.)
Line 4: Line 4:
 
===Main classes===
 
===Main classes===
  
{{todo}}
+
These classes encapsulate a regular expression and the results of matching a regular expression within a target sequence of characters.
  
 
{{dcl list begin}}
 
{{dcl list begin}}
Line 11: Line 11:
 
{{dcl list tclass | cpp/regex/match_results | identifies all matching results | notes={{mark c++11}}}}
 
{{dcl list tclass | cpp/regex/match_results | identifies all matching results | notes={{mark c++11}}}}
 
{{dcl list end}}
 
{{dcl list end}}
 
{{todo}}
 
  
 
===Algorithms===
 
===Algorithms===
 +
 +
These functions are used to apply the regular expression encapsulated in a regex to a target sequence of characters..
  
 
{{dcl list begin}}
 
{{dcl list begin}}
Line 23: Line 23:
  
 
===Iterators===
 
===Iterators===
 +
 +
The regex iterators are used to traverse the entire set of regular expression matches found within a sequence.
  
 
{{dcl list begin}}
 
{{dcl list begin}}
Line 31: Line 33:
 
===Exceptions===
 
===Exceptions===
  
{{todo}}
+
This class defines the type of objects thrown as exceptions to report errors from the regular expressions library.
 +
 
 +
{{dcl list begin}}
 +
{{ddcl list header | regex}}
 +
{{dcl list class | cpp/regex/regex_error | | notes={{mark c++11}}}}
 +
{{dcl list end}}
  
 
===Traits===
 
===Traits===
  
{{todo}}
+
The regex traits class is used to encapsulate the localizable aspects of a regex.
 +
 
 +
{{dcl list begin}}
 +
{{ddcl list header | regex}}
 +
{{dcl list tclass | cpp/regex/regex_traits | | notes={{mark c++11}}}}
 +
{{dcl list end}}
  
 
===Constants===
 
===Constants===

Revision as of 08:14, 20 October 2011

Template:cpp/regex/sidebar

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.

<tr class="t-dsc-header"> <td>
Defined in header <regex>
</td>

<td></td> <td></td> </tr>


(class)

Traits

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

<tr class="t-dsc-header"> <td>
Defined in header <regex>
</td>

<td></td> <td></td> </tr>


(class template)

Constants

syntax_option_type

match_flag_type

error_type