📜  C++库-

📅  最后修改于: 2020-12-15 04:26:17             🧑  作者: Mango


介绍

这是一种表示要与字符序列匹配的模式的标准化方法。一些典型的正则表达式参数如下所示-

  • 目标序列(对象) -用于搜索序列模式。

  • 正则表达式(模式) -用于在目标序列中搜索。

  • 件阵列-比赛的信息被存储在特殊数组的match_results类型(如C匹配或SMATCH)中的一个。

  • 替换字符串-此操作替换匹配项。

正则表达式操作

Sr.No. Regex operation & description
1 regex_match

It is a match sequence.

2 regex_search

It is a search sequence.

3 regex_replace

It is a replace matched sequence.

迭代器类型

Sr.No. Iterator type & description
1 regex_iterator

It is a regex iterator.

2 regex_token_iterator

It is a regex token iterator.

basic_regex实例化

Sr.No. Instantiation & description
1 regex

It is a regex class.

2 wregex

It is a wregex class.

match_results实例化

Sr.No. match_results instantiation & description
1 cmatch

These are match_results for string literals.

2 wcmatch

These are match_results for wide string literals.

3 smatch

These are match_results for string objects.

4 wsmatch

These are match_results for wide string objects.

sub_match实例化

Sr.No. sub_match instantiation & description
1 csub_match

It is a sub_match for string literals.

2 wcsub_match

It is a sub_match for wide string literals.

3 ssub_match

It is a sub_match for strings.

4 wssub_match

It is a sub_match for wide strings.

命名空间

Sr.No. Namespace & description
1 regex_constants

It is a regex constants.