[re.tokiter.incr]

# 28 Text processing library [[text]](./#text)

## 28.6 Regular expressions library [[re]](re#tokiter.incr)

### 28.6.11 Regular expression iterators [[re.iter]](re.iter#re.tokiter.incr)

#### 28.6.11.2 Class template regex_token_iterator [[re.tokiter]](re.tokiter#incr)

#### 28.6.11.2.5 Increment [re.tokiter.incr]

[ð](#lib:regex_token_iterator,operator++)

`regex_token_iterator& operator++();
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12734)

*Effects*: Constructs a local variable prev of
type position_iterator, initialized with the value
of position[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12740)

If *this is a suffix iterator, sets *this to an
end-of-sequence iterator[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12744)

Otherwise, if N + 1 < subs.size(), increments N and
sets result to the address of the current match[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12748)

Otherwise, sets N to 0 and
increments position[.](#4.sentence-1)

If position is not an
end-of-sequence iterator the operator sets result to the
address of the current match[.](#4.sentence-2)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12754)

Otherwise, if any of the values stored in subs is equal to â1 andprev->suffix().length() is not 0 the operator sets *this to a
suffix iterator that points to the range [prev->suffix().first, prev->suffix().second)[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12759)

Otherwise, sets *this to an end-of-sequence iterator[.](#6.sentence-1)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12762)

*Returns*: *this[.](#7.sentence-1)

[ð](#lib:regex_token_iterator,operator++_)

`regex_token_iterator& operator++(int);
`

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12773)

*Effects*: Constructs a copy tmp of *this, then calls ++(*this)[.](#8.sentence-1)

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L12777)

*Returns*: tmp[.](#9.sentence-1)
