---
name: "std::tr1::regex_token_iterator"
section: "3cxx"
platform: "linux"
package: "libstdc++6-4.4-doc"
version: "4.4.5-8"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/std::tr1::regex_token_iterator"
---

# std::tr1::regex\_token\_iterator(3cxx)

## NAME

std::tr1::regex\_token\_iterator -

## SYNOPSIS

### Public Types

typedef std::ptrdiff\_t **difference\_type**\
 typedef **std::forward\_iterator\_tag** **iterator\_category**\
 typedef const **value\_type** \* **pointer**\
 typedef const **value\_type** & **reference**\
 typedef **basic\_regex**\< \_Ch\_type, \_Rx\_traits \> **regex\_type**\
 typedef **sub\_match**\< \_Bi\_iter \> **value\_type**\

### Public Member Functions

bool **operator!=** (const **regex\_token\_iterator** &\_\_rhs)\
 const **value\_type** & **operator\*** ()\
 **regex\_token\_iterator** & **operator++** ()\
 **regex\_token\_iterator** **operator++** (int)\
 const **value\_type** \* **operator-\>** ()\
 **regex\_token\_iterator** & **operator=** (const **regex\_token\_iterator** &\_\_rhs)\
 bool **operator==** (const **regex\_token\_iterator** &\_\_rhs)\
 **regex\_token\_iterator** (const **regex\_token\_iterator** &\_\_rhs)\
 **regex\_token\_iterator** (\_Bi\_iter \_\_a, \_Bi\_iter \_\_b, const **regex\_type** &\_\_re, const **std::vector**\< int \> &\_\_submatches, **regex\_constants::match\_flag\_type** \_\_m=regex\_constants::match\_default)\
 **regex\_token\_iterator** (\_Bi\_iter \_\_a, \_Bi\_iter \_\_b, const **regex\_type** &\_\_re, int \_\_submatch=0, **regex\_constants::match\_flag\_type** \_\_m=regex\_constants::match\_default)\
 **regex\_token\_iterator** ()\
 template\<std::size\_t \_Nm\> **regex\_token\_iterator** (\_Bi\_iter \_\_a, \_Bi\_iter \_\_b, const **regex\_type** &\_\_re, const int(&\_\_submatches)\[\_Nm\], **regex\_constants::match\_flag\_type** \_\_m=regex\_constants::match\_default)\

## Detailed Description

### template\<typename \_Bi\_iter, typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> class std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>

Iterates over submatches in a range (or 'splits' a text string).

The purpose of this iterator is to enumerate all, or all specified, matches of a regular expression within a text range. The dereferenced value of an iterator of this class is a **std::tr1::sub\_match** object.

Definition at line 2544 of file tr1\_impl/regex.

## Constructor & Destructor Documentation

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::regex\_token\_iterator ()

Default constructs a regex\_token\_iterator. **Todo**

Implement this function.

A default-constructed regex\_token\_iterator is a singular iterator that will compare equal to the one-past-the-end value for any iterator of the same type.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::regex\_token\_iterator (\_Bi\_iter \_\_a, \_Bi\_iter \_\_b, const regex\_type & \_\_re, int \_\_submatch = `0`, regex\_constants::match\_flag\_type \_\_m = `regex_constants::match_default`) Constructs a regex\_token\_iterator...

**Parameters:**

*a* \[IN\] The start of the text to search. \
 *b* \[IN\] One-past-the-end of the text to search. \
 *re* \[IN\] The regular expression to search for. \
 *submatch* \[IN\] Which submatch to return. There are some special values for this parameter:

- •

  \-1 each enumerated subexpression does NOT match the regular expression (aka field splitting)

- •

  0 the entire string matching the subexpression is returned for each match within the text.

- •

  \>0 enumerates only the indicated subexpression from a match within the text.

*m* \[IN\] Policy flags for match rules.

**Todo**

Implement this function.

Doc me! See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::regex\_token\_iterator (\_Bi\_iter \_\_a, \_Bi\_iter \_\_b, const regex\_type & \_\_re, const std::vector\< int \> & \_\_submatches, regex\_constants::match\_flag\_type \_\_m = `regex_constants::match_default`) Constructs a regex\_token\_iterator...

**Parameters:**

*a* \[IN\] The start of the text to search. \
 *b* \[IN\] One-past-the-end of the text to search. \
 *re* \[IN\] The regular expression to search for. \
 *submatches* \[IN\] A list of subexpressions to return for each regular expression match within the text. \
 *m* \[IN\] Policy flags for match rules.

**Todo**

Implement this function.

Doc me! See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> template\<std::size\_t \_Nm\> std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::regex\_token\_iterator (\_Bi\_iter \_\_a, \_Bi\_iter \_\_b, const regex\_type & \_\_re, const int(&) \_\_submatches\[\_Nm\], regex\_constants::match\_flag\_type \_\_m = `regex_constants::match_default`) Constructs a regex\_token\_iterator...

**Parameters:**

*a* \[IN\] The start of the text to search. \
 *b* \[IN\] One-past-the-end of the text to search. \
 *re* \[IN\] The regular expression to search for. \
 *submatches* \[IN\] A list of subexpressions to return for each regular expression match within the text. \
 *m* \[IN\] Policy flags for match rules.

**Todo**

Implement this function.

Doc me! See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::regex\_token\_iterator (const regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \> & \_\_rhs)

Copy constructs a regex\_token\_iterator. **Parameters:**

*rhs* \[IN\] A regex\_token\_iterator to copy.

**Todo**

Implement this function.

## Member Function Documentation

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> bool std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator!= (const regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \> & \_\_rhs)

Compares a regex\_token\_iterator to another for inequality. **Todo**

Implement this function.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> const value\_type& std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator\* ()

Dereferences a regex\_token\_iterator. **Todo**

Implement this function.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> regex\_token\_iterator std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator++ (int)

Postincrements a regex\_token\_iterator. **Todo**

Implement this function.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> regex\_token\_iterator& std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator++ ()

Increments a regex\_token\_iterator. **Todo**

Implement this function.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> const value\_type\* std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator-\> ()

Selects a regex\_token\_iterator member. **Todo**

Implement this function.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> regex\_token\_iterator& std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator= (const regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \> & \_\_rhs)

Assigns a regex\_token\_iterator to another. **Parameters:**

*rhs* \[IN\] A regex\_token\_iterator to copy.

**Todo**

Implement this function.

### template\<typename \_Bi\_iter , typename \_Ch\_type = typename iterator\_traits\<\_Bi\_iter\>::value\_type, typename \_Rx\_traits = regex\_traits\<\_Ch\_type\>\> bool std::tr1::regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \>::operator== (const regex\_token\_iterator\< \_Bi\_iter, \_Ch\_type, \_Rx\_traits \> & \_\_rhs)

Compares a regex\_token\_iterator to another for equality. **Todo**

Implement this function.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
