boost::regex
来源:互联网 发布:制作cf刷枪软件 编辑:程序博客网 时间:2024/05/12 17:19
match_results:
#include <regex> template < typename BidirectionalIterator, typename Allocator = allocator<sub_match<BidirectionalIterator> >> class match_results;
The class template match_results
holds a collection of character sequences that represent the result of a regular expression match. Several specializations for common character sequence types are provided:
typedef match_results<const char*> cmatch;typedef match_results<const wchar_t*> wcmatch;typedef match_results<std::string::const_iterator> smatch;typedef match_results<std::wstring::const_iterator> wsmatch;
字匹配的类型
csub_matchwcsub_matchssub_match
wssub_match
Member types
sub_match<BidirectionalIterator>
value_type
const value_type&
const_reference
const_reference
reference
(implementation-defined) const_iterator
const_iterator
iterator
typename iterator_traits<BidirectionalIterator>::difference_type
difference_type
typename allocator_traits<Allocator>::size_type
size_type
Allocator
allocator_type
typename iterator_traits<BidirectionalIterator>::value_type
char_type
std::basic_string<char_type>
string_type
Member functions
Constructors create a matchOperators assign values to a matchget_allocator returns the allocator for this objectswap swaps the matched sub-expressions with another
match_results
Size
size 如果匹配成功,返回 1 + 匹配的子表达式个数max_size 最多可存储子匹配的个数empty 返回true 当有至少一个子匹配时,否则返回false
Element access
length the length of a particular sub-expression position the distance between the start of the target sequence and a given sub-expression str the sequence of characters for a given sub-expression operator_at returns a reference to the
sub_match
for a specific sub-expression prefix the characters from the start of the original sequence to the beginning of the matchsuffix the characters from the end of the match to the end of the original sequencebegin,cbegin an iterator that enumerates the sub-expressions in *this
end,cend an iterator that terminates the sub-expressions in *this
Formatting
length length(int sub=0) 指定子表达式的长度position position(int sub=0) 指定子表达式与被匹配串开头之间的字节数 str str(int sub=0) 指定子表达式匹配得到的字串的长度operator_at []返回子匹配prefix 原始串的开头到第一个匹配点的字节数suffix 匹配点的下一个位置到原始串结束的字节数begin,cbegin返回指向第一个子匹配(what[0])的迭代器
end,cend
format formats match results for output
- Boost.Regex
- Boost::Regex
- boost RegEx
- boost:regex
- boost::regex
- boost:regex
- BOOST::Regex
- boost regex
- boost -- regex
- boost::regex
- boost Regex
- <Boost> 正則表達式boost::regex
- boost::string or boost::regex
- 简介Boost.Regex
- boost.regex 浏览小记
- Boost.Regex 使用
- Boost::Regex Usage
- boost 库Regex使用
- 单向链表的创建及翻转
- context
- 迈向千兆WiFi必杀:初窥802.11ac/ad标准
- jquery之设置元素内容(删除元素,使用remove(),empty()方法)
- Python学习笔记之递归
- boost::regex
- Builder模式
- 在TreeCtrl控件中,加入了checkbox的风格。那当我在checkbox 中打勾时会引发什么消息呀
- FM加上RDS前途远大
- hello world开始linux驱动
- 使用UltraEdit去除前导行号
- Linux C MySQL数据库函数
- usb专题
- Python学习笔记之中文注释