<regex>
1塌计,regex類袒哥,設(shè)置匹配模式pattern
2缩筛,regex_match,regex_search匹配字符串堡称,返回bool類型表征是否匹配到
3瞎抛,smatch類string,存儲匹配的詳細信息;cmatch類(const char*);wsmatch類(wstring),wcmatch(const wchar_t*)
match的結(jié)果的結(jié)構(gòu)
1却紧,m[0]匹配的match_results
2桐臊,prefix()和suffix()分別是匹配元素的前后部分
3,m[1]晓殊,m[2]断凶,m[3]匹配到的元素的子元素
match_results<>類的定義
typedef match_results<string::const_iterator> smatch;
typedef match_results<wstring::const_iterator> wsmatch;
typedef match_results<const char*> cmatch;
typedef match_results<const wchar_t*> wcmatch;
sed:類似UNIX使用的命令語法