std::match_results

来自cppreference.com

 
 
正則表達式庫
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_regex(C++11)
sub_match(C++11)
match_results(C++11)
演算法
Original:
Algorithms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_match(C++11)
regex_search(C++11)
regex_replace(C++11)
迭代器
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_iterator(C++11)
regex_token_iterator(C++11)
例外
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_error(C++11)
性狀
Original:
Traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_traits(C++11)
常量
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
syntax_option_type(C++11)
match_flag_type(C++11)
error_type(C++11)
 
std::match_results
成員函數
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::match_results
match_results::~match_results
match_results::operator=
match_results::get_allocator
國家
Original:
State
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::ready
元素的訪問
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::size
match_results::max_size
match_results::empty
match_results::length
match_results::position
match_results::str
match_results::operator_at
match_results::prefix
match_results::suffix
迭代器
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::begin
match_results::cbegin
match_results::end
match_results::cend
格式
Original:
Format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::format
修飾符
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
match_results::swap
 
Defined in header <regex>
template<

    class BidirIt,
    class Alloc = std::allocator<std::sub_match<BidirIt>>

> class match_results;
(C++11 起)
類模板std::match_results由一組字元序列,表示正則表達式匹配的結果.
Original:
The class template std::match_results holds a collection of character sequences that represent the result of a regular expression match.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
這是一種專門分配器感知容器。它只能被默認創建或修改傳遞給std::regex_search()std::regex_match()演算法.
Original:
This is a specialized allocator-aware container. It can only be default created or modified by passing to the std::regex_search() or std::regex_match() algorithms.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
的sub_match(索引0)在match_result始終代表完全匹配一個正則表達式內的靶序列,並隨後的sub_matches代表子表達式匹配相應的序列左括弧分隔的子表達式在正則表達式.
Original:
The first sub_match (index 0) contained in a match_result always represents the full match within a target sequence made by a regex, and subsequent sub_matches represent sub-expression matches corresponding in sequence to the left parenthesis delimiting the sub-expression in the regex.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目錄

[编辑] 類型要求

-
BidirIt must meet the requirements of BidirectionalIterator.
-
Alloc must meet the requirements of Allocator.

[编辑] 專業化

常見的字元序列類型的幾個專業,分別為:
Original:
Several specializations for common character sequence types are provided:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <regex>
類型
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
cmatch match_results<const char*>
wcmatch match_results<const wchar_t*>
smatch match_results<std::string::const_iterator>
wsmatch match_results<std::wstring::const_iterator>

[编辑] 會員類型

會員類型
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
allocator_type Allocator
value_type std::sub_match<BidirIt>
const_reference const value_type&
reference const_reference
const_iterator
「實現定義的'(取決於基礎容器)
Original:
implementation defined (depends on the underlying container)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iterator const_iterator
difference_type std::iterator_traits<BidirIt>::difference_type
size_type std::allocator_traits<Alloc>::size_type
char_type std::iterator_traits<BidirIt>::value_type
string_type std::basic_string<char_type>

[编辑] 成員函數

構造對象
Original:
constructs the object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
解構的對象
Original:
destructs the object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
分配的內容
Original:
assigns the contents
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回的關聯分配器
Original:
returns the associated allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
國家
Original:
State
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數)
大小
Original:
Size
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
檢查是否匹配成功
Original:
checks whether the match was successful
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回匹配的數目,在一個完全的結果狀態
Original:
returns the number of matches in a fully-established result state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回的最大可能數目的子匹配
Original:
returns the maximum possible number of sub-matches
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
元素的訪問
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
返回的特定子匹配的長度
Original:
returns the length of the particular sub-match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回的特定子匹配的第一個字元的位置
Original:
returns the position of the first character of the particular sub-match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回的字元序列為特定子如同
Original:
returns the sequence of characters for the particular sub-match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回指定的子匹配
Original:
returns specified sub-match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回子序列之間的靶序列的開頭和全匹配的開始.
Original:
returns sub-sequence between the beginning of the target sequence and the beginning of the full match.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
返回子序列結束之間的完全匹配和靶序列的結束
Original:
returns sub-sequence between the end of the full match and the end of the target sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
迭代器
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
迭代器返回的列表的開頭的子匹配
Original:
returns iterator to the beginning of the list of sub-matches
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
迭代器返回的列表的末尾的子匹配
Original:
returns iterator to the end of the list of sub-matches
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]
格式
Original:
Format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
formats match results for output
(公共成員函數) [edit]
修飾符
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
交換的內容
Original:
swaps the contents
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成員函數) [edit]

[编辑] 非成員函數

字典的值進行比較,在這兩個比賽的結果
Original:
lexicographically compares the values in the two match result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函數模板) [edit]
專業的std::swap()演算法
Original:
specializes the std::swap() algorithm
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函數模板) [edit]