C++ åèæå
- C++11
- C++14
- C++17
- C++20
- C++ ç¼è¯å¨æ¯ææ åµè¡¨
- ç¬ç«ä¸å®¿ä¸»å®ç°
- C++ è¯è¨
- C++ å ³é®è¯
- é¢å¤çå¨
- C++ æ ååºå¤´æä»¶
- æ ååºå¤´æä»¶ <ctime>
- æ ååºå¤´æä»¶ <cstring>
- æ ååºå¤´æä»¶ <set>
- æ ååºå¤´æä»¶ <cctype>
- æ ååºå¤´æä»¶ <cwctype>
- æ ååºå¤´æä»¶ <utility>
- æ ååºå¤´æä»¶ <queue>
- æ ååºå¤´æä»¶ <complex>
- æ ååºå¤´æä»¶ <iterator>
- æ ååºå¤´æä»¶ <algorithm>
- æ ååºå¤´æä»¶ <valarray>
- æ ååºå¤´æä»¶ <numeric>
- æ ååºå¤´æä»¶ <cmath>
- æ ååºå¤´æä»¶ <iosfwd>
- æ ååºå¤´æä»¶ <ios>
- æ ååºå¤´æä»¶ <iomanip>
- æ ååºå¤´æä»¶ <streambuf>
- æ ååºå¤´æä»¶ <istream>
- æ ååºå¤´æä»¶ <ostream>
- æ ååºå¤´æä»¶ <iostream>
- æ ååºå¤´æä»¶ <sstream>
- æ ååºå¤´æä»¶ <clocale>
- æ ååºå¤´æä»¶ <vector>
- æ ååºå¤´æä»¶ <deque>
- æ ååºå¤´æä»¶ <list>
- æ ååºå¤´æä»¶ <map>
- æ ååºå¤´æä»¶ <cwchar>
- æ ååºå¤´æä»¶ <locale>
- æ ååºå¤´æä»¶ <codecvt>
- æ ååºå¤´æä»¶ <bitset>
- æ ååºå¤´æä»¶ <functional>
- æ ååºå¤´æä»¶ <stdexcept>
- æ ååºå¤´æä»¶ <csignal>
- æ ååºå¤´æä»¶ <csetjmp>
- æ ååºå¤´æä»¶ <stack>
- æ ååºå¤´æä»¶ <cassert>
- æ ååºå¤´æä»¶ <cerrno>
- æ ååºå¤´æä»¶ <memory>
- æ ååºå¤´æä»¶ <typeindex>
- æ ååºå¤´æä»¶ <type_traits>
- æ ååºå¤´æä»¶ <chrono>
- æ ååºå¤´æä»¶ <initializer_list>
- æ ååºå¤´æä»¶ <tuple>
- æ ååºå¤´æä»¶ <scoped_allocator>
- æ ååºå¤´æä»¶ <cstdint>
- æ ååºå¤´æä»¶ <cinttypes>
- æ ååºå¤´æä»¶ <system_error>
- æ ååºå¤´æä»¶ <cuchar>
- æ ååºå¤´æä»¶ <array>
- æ ååºå¤´æä»¶ <forward_list>
- æ ååºå¤´æä»¶ <unordered_set>
- æ ååºå¤´æä»¶ <unordered_map>
- æ ååºå¤´æä»¶ <random>
- æ ååºå¤´æä»¶ <ratio>
- æ ååºå¤´æä»¶ <cfenv>
- æ ååºå¤´æä»¶ <regex>
- æ ååºå¤´æä»¶ <atomic>
- æ ååºå¤´æä»¶ <thread>
- æ ååºå¤´æä»¶ <mutex>
- æ ååºå¤´æä»¶ <future>
- æ ååºå¤´æä»¶ <condition_variable>
- æ ååºå¤´æä»¶ <any>
- æ ååºå¤´æä»¶ <optional>
- æ ååºå¤´æä»¶ <variant>
- æ ååºå¤´æä»¶ <memory_resource>
- æ ååºå¤´æä»¶ <string_view>
- æ ååºå¤´æä»¶ <charconv>
- æ ååºå¤´æä»¶ <execution>
- æ ååºå¤´æä»¶ <filesystem>
- æ ååºå¤´æä»¶ <concepts>
- æ ååºå¤´æä»¶ <coroutine>
- æ ååºå¤´æä»¶ <compare>
- æ ååºå¤´æä»¶ <version>
- æ ååºå¤´æä»¶ <source_location>
- æ ååºå¤´æä»¶ <format>
- æ ååºå¤´æä»¶ <span>
- æ ååºå¤´æä»¶ <ranges>
- æ ååºå¤´æä»¶ <bit>
- æ ååºå¤´æä»¶ <numbers>
- æ ååºå¤´æä»¶ <syncstream>
- æ ååºå¤´æä»¶ <stop_token>
- æ ååºå¤´æä»¶ <semaphore>
- æ ååºå¤´æä»¶ <latch>
- æ ååºå¤´æä»¶ <barrier>
- æ ååºå¤´æä»¶ <string>
- æ ååºå¤´æä»¶ <cstddef>
- æ ååºå¤´æä»¶ <limits>
- æ ååºå¤´æä»¶ <cfloat>
- æ ååºå¤´æä»¶ <climits>
- æ ååºå¤´æä»¶ <cstdlib>
- æ ååºå¤´æä»¶ <new>
- æ ååºå¤´æä»¶ <typeinfo>
- æ ååºå¤´æä»¶ <exception>
- æ ååºå¤´æä»¶ <cstdarg>
- æ ååºå¤´æä»¶ <ciso646>
- æ ååºå¤´æä»¶ <cstdalign>
- æ ååºå¤´æä»¶ <cstdbool>
- æ ååºå¤´æä»¶ <fstream>
- æ ååºå¤´æä»¶ <cstdio>
- æ ååºå¤´æä»¶ <strstream>
- æ ååºå¤´æä»¶ <shared_mutex>
- æ ååºå¤´æä»¶ <ccomplex>
- æ ååºå¤´æä»¶ <ctgmath>
- 注é
- å ·åè¦æ±
- åè½ç¹æ§æµè¯ (C++20)
- å·¥å ·åº
- ç±»åæ¯æï¼åºæ¬ç±»åãRTTIãç±»åç¹æ§ï¼
- æ¦å¿µåº (C++20)
- é误å¤ç
- 卿å å管ç
- æ¥æåæ¶é´å·¥å ·
- å符串åº
- 容å¨åº
- è¿ä»£å¨åº
- èå´åº (C++20)
- ç®æ³åº
- æ°å¼åº
- è¾å ¥/è¾åºåº
- æä»¶ç³»ç»åº
- æ¬å°ååº
- æ£å表达å¼åº
- ååæä½åº
- çº¿ç¨æ¯æåº
- å®éªæ§ C++ ç¹æ§
- æç¨çèµæº
- ç´¢å¼
- std 符å·ç´¢å¼
- åç¨æ¯æ (C++20)
- C++ å ³é®è¯
ä½ç½®ï¼é¦é¡µ > C++ åèæå >C++ æ ååºå¤´æä»¶ > æ ååºå¤´æä»¶ <regex>
æ ååºå¤´æä»¶ <regex>
æ¤å¤´æä»¶æ¯æ£å表达å¼åºçä¸é¨åã
å½åç©ºé´ std::regex_constants
ç±»å | |
| å®ä¹äºå½å空é´
std::regex_constants | |
| (C++11) |
æ§å¶æ£å表达å¼è¡ä¸ºçéç¨é项 (typedef) |
| (C++11) |
ç¹å®äºå¹é
çé项 (typedef) |
| (C++11) |
æè¿°ä¸åç±»åçå¹é
é误 (typedef) |
| æ¬èæªå®æ åå ï¼ååºææå¸¸é |
ç±»
| (C++11) |
æ£å表达å¼å¯¹è±¡ (类模æ¿) |
| (C++11) |
æ è¯åè¡¨è¾¾å¼æå¹é
çå符åºå (类模æ¿) |
| (C++11) |
æ è¯ä¸ä¸ªæ£å表达å¼å¹é
ï¼å
嫿æå表达å¼å¹é
(类模æ¿) |
| (C++11) |
è¿ä»£ä¸ä¸ªå符åºåä¸çæææ£å表达å¼å¹é
(类模æ¿) |
| (C++11) |
è¿ä»£ç»å®å符串ä¸çæææ£å表达å¼å¹é
ä¸çæå®å表达å¼ï¼æè¿ä»£æªå¹é
çåå符串 (类模æ¿) |
| (C++11) |
æ¥åæ£å表达å¼åºçæçé误 (ç±») |
| (C++11) |
æä¾æ£å表达å¼åºæéçå
³äºå符类åçå
ä¿¡æ¯ (类模æ¿) |
彿°
ç®æ³ | |
| (C++11) |
å°è¯å¹é
ä¸ä¸ªæ£å表达å¼å°æ´ä¸ªå符åºå (彿°æ¨¡æ¿) |
| (C++11) |
å°è¯å¹é
ä¸ä¸ªæ£å表达å¼å°å符åºåçä»»ä½é¨å (彿°æ¨¡æ¿) |
| (C++11) |
ä»¥æ ¼å¼åçæ¿æ¢ææ¬æ¥æ¿æ¢æ£å表达å¼å¹é
çåºç°ä½ç½® (彿°æ¨¡æ¿) |
éæå彿° | |
| (C++11) |
ç¹å std::swap ç®æ³ (彿°æ¨¡æ¿) |
| (C++20 ä¸ç§»é¤)(C++20 ä¸ç§»é¤)(C++20 ä¸ç§»é¤)(C++20 ä¸ç§»é¤)(C++20 ä¸ç§»é¤)(C++20) |
æ¯è¾ä¸ä¸ª sub_match ä¸å¦ä¸ sub_match ãå符串æå符 (彿°æ¨¡æ¿) |
| è¾åºå¹é
çå符åºå (彿°æ¨¡æ¿) | |
| (C++20 ä¸ç§»é¤) |
以åå
¸åºæ¯è¾ä¸¤ä¸ªå¹é
ç»æçå¼ (彿°æ¨¡æ¿) |
| ç¹å std::swap() ç®æ³ (彿°æ¨¡æ¿) | |
æ¦è¦
#include <initializer_list>  namespace std {  // regex 常éï¼ namespace regex_constants { enum error_type; } // namespace regex_constants  // ç±» regex_error: class regex_error; // ç±»æ¨¡æ¿ regex_traits: template <class charT> struct regex_traits; // ç±»æ¨¡æ¿ basic_regex: template <class charT, class traits = regex_traits<charT> > class basic_regex;  typedef basic_regex<char> regex; typedef basic_regex<wchar_t> wregex;  // basic_regex 交æ¢ï¼ template <class charT, class traits> void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2);  // ç±»æ¨¡æ¿ sub_match: template <class BidirectionalIterator> class sub_match;  typedef sub_match<const char*> csub_match; typedef sub_match<const wchar_t*> wcsub_match; typedef sub_match<string::const_iterator> ssub_match; typedef sub_match<wstring::const_iterator> wssub_match;  // sub_match éæåè¿ç®ç¬¦ï¼ template <class BiIter> bool operator==(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator!=(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator<(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator<=(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator>=(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);  template <class BiIter, class ST, class SA> bool operator==( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template <class BiIter, class ST, class SA> bool operator!=( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template <class BiIter, class ST, class SA> bool operator<( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template <class BiIter, class ST, class SA> bool operator>( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template <class BiIter, class ST, class SA> bool operator>=( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template <class BiIter, class ST, class SA> bool operator<=( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs);   template <class BiIter, class ST, class SA> bool operator==( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template <class BiIter, class ST, class SA> bool operator!=( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template <class BiIter, class ST, class SA> bool operator<( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template <class BiIter, class ST, class SA> bool operator>( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template <class BiIter, class ST, class SA> bool operator<=( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template <class BiIter, class ST, class SA> bool operator>=( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs);  template <class BiIter> bool operator==(typename iterator_traits<BiIter>::value_type const* lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator!=(typename iterator_traits<BiIter>::value_type const* lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator<(typename iterator_traits<BiIter>::value_type const* lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator>(typename iterator_traits<BiIter>::value_type const* lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator>=(typename iterator_traits<BiIter>::value_type const* lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator<=(typename iterator_traits<BiIter>::value_type const* lhs, const sub_match<BiIter>& rhs);  template <class BiIter> bool operator==(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const* rhs); template <class BiIter> bool operator!=(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const* rhs); template <class BiIter> bool operator<=(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const* rhs); template <class BiIter> bool operator>=(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const* rhs); template <class BiIter> bool operator<(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const* rhs); template <class BiIter> bool operator>(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const* rhs);   template <class BiIter> bool operator==(typename iterator_traits<BiIter>::value_type const& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator!=(typename iterator_traits<BiIter>::value_type const& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator>=(typename iterator_traits<BiIter>::value_type const& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator<=(typename iterator_traits<BiIter>::value_type const& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator>(typename iterator_traits<BiIter>::value_type const& lhs, const sub_match<BiIter>& rhs); template <class BiIter> bool operator<(typename iterator_traits<BiIter>::value_type const& lhs, const sub_match<BiIter>& rhs);  template <class BiIter> bool operator==(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const& rhs); template <class BiIter> bool operator!=(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const& rhs); template <class BiIter> bool operator>=(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const& rhs); template <class BiIter> bool operator<=(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const& rhs); template <class BiIter> bool operator<(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const& rhs); template <class BiIter> bool operator>(const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const& rhs);  template <class charT, class ST, class BiIter> basic_ostream<charT, ST>& operator<<(basic_ostream<charT, ST>& os, const sub_match<BiIter>& m);  // ç±»æ¨¡æ¿ match_results: template <class BidirectionalIterator, class Allocator = allocator<sub_match<BidirectionalIterator> > > class match_results;  typedef match_results<const char*> cmatch; typedef match_results<const wchar_t*> wcmatch; typedef match_results<string::const_iterator> smatch; typedef match_results<wstring::const_iterator> wsmatch;  // match_results æ¯è¾ template <class BidirectionalIterator, class Allocator> bool operator== (const match_results<BidirectionalIterator, Allocator>& m1, const match_results<BidirectionalIterator, Allocator>& m2); template <class BidirectionalIterator, class Allocator> bool operator!= (const match_results<BidirectionalIterator, Allocator>& m1, const match_results<BidirectionalIterator, Allocator>& m2);  // match_results 交æ¢ï¼ template <class BidirectionalIterator, class Allocator> void swap(match_results<BidirectionalIterator, Allocator>& m1, match_results<BidirectionalIterator, Allocator>& m2);  // 彿°æ¨¡æ¿ regex_match: template <class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class BidirectionalIterator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class charT, class Allocator, class traits> bool regex_match(const charT* str, match_results<const charT*, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class ST, class SA, class Allocator, class charT, class traits> bool regex_match(const basic_string<charT, ST, SA>& s, match_results< typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class charT, class traits> bool regex_match(const charT* str, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class ST, class SA, class charT, class traits> bool regex_match(const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default);  // 彿°æ¨¡æ¿ regex_search: template <class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_search(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class BidirectionalIterator, class charT, class traits> bool regex_search(BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class charT, class Allocator, class traits> bool regex_search(const charT* str, match_results<const charT*, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class charT, class traits> bool regex_search(const charT* str, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class ST, class SA, class charT, class traits> bool regex_search(const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class ST, class SA, class Allocator, class charT, class traits> bool regex_search(const basic_string<charT, ST, SA>& s, match_results< typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default);  // 彿°æ¨¡æ¿ regex_replace: template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class ST, class SA> OutputIterator regex_replace( OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, const basic_string<charT, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template <class OutputIterator, class BidirectionalIterator, class traits, class charT> OutputIterator regex_replace( OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template <class traits, class charT, class ST, class SA, class FST, class FSA> basic_string<charT, ST, SA> regex_replace( const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, const basic_string<charT, FST, FSA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template <class traits, class charT, class ST, class SA> basic_string<charT, ST, SA> regex_replace( const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template <class traits, class charT, class ST, class SA> basic_string<charT> regex_replace( const charT* s, const basic_regex<charT, traits>& e, const basic_string<charT, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template <class traits, class charT> basic_string<charT> regex_replace( const charT* s, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default);  // ç±»æ¨¡æ¿ regex_iterator: template <class BidirectionalIterator, class charT = typename iterator_traits< BidirectionalIterator>::value_type, class traits = regex_traits<charT> > class regex_iterator;  typedef regex_iterator<const char*> cregex_iterator; typedef regex_iterator<const wchar_t*> wcregex_iterator; typedef regex_iterator<string::const_iterator> sregex_iterator; typedef regex_iterator<wstring::const_iterator> wsregex_iterator;  // ç±»æ¨¡æ¿ regex_token_iterator: template <class BidirectionalIterator, class charT = typename iterator_traits< BidirectionalIterator>::value_type, class traits = regex_traits<charT> > class regex_token_iterator;  typedef regex_token_iterator<const char*> cregex_token_iterator; typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator; typedef regex_token_iterator<string::const_iterator> scregex_token_iterator; typedef regex_token_iterator<wstring::const_iterator> wscregex_token_iterator;   } // namespace std
å½åç©ºé´ std::regex_constants
namespace regex_constants { typedef /*T1*/ syntax_option_type; static constexpr syntax_option_type icase = /* æªææ */ ; static constexpr syntax_option_type nosubs = /* æªææ */ ; static constexpr syntax_option_type optimize = /* æªææ */ ; static constexpr syntax_option_type collate = /* æªææ */ ; static constexpr syntax_option_type ECMAScript = /* æªææ */ ; static constexpr syntax_option_type basic = /* æªææ */ ; static constexpr syntax_option_type extended = /* æªææ */ ; static constexpr syntax_option_type awk = /* æªææ */ ; static constexpr syntax_option_type grep = /* æªææ */ ; static constexpr syntax_option_type egrep = /* æªææ */ ;  typedef /*T2*/ match_flag_type; static constexpr match_flag_type match_default = 0; static constexpr match_flag_type match_not_bol = /* æªææ */ ; static constexpr match_flag_type match_not_eol = /* æªææ */ ; static constexpr match_flag_type match_not_bow = /* æªææ */ ; static constexpr match_flag_type match_not_eow = /* æªææ */ ; static constexpr match_flag_type match_any = /* æªææ */ ; static constexpr match_flag_type match_not_null = /* æªææ */ ; static constexpr match_flag_type match_continuous = /* æªææ */ ; static constexpr match_flag_type match_prev_avail = /* æªææ */ ; static constexpr match_flag_type format_default = 0; static constexpr match_flag_type format_sed = /* æªææ */ ; static constexpr match_flag_type format_no_copy = /* æªææ */ ; static constexpr match_flag_type format_first_only = /* æªææ */ ;  typedef /*T3*/ error_type; static constexpr error_type error_collate = /* æªææ */ ; static constexpr error_type error_ctype = /* æªææ */ ; static constexpr error_type error_escape = /* æªææ */ ; static constexpr error_type error_backref = /* æªææ */ ; static constexpr error_type error_brack = /* æªææ */ ; static constexpr error_type error_paren = /* æªææ */ ; static constexpr error_type error_brace = /* æªææ */ ; static constexpr error_type error_badbrace = /* æªææ */ ; static constexpr error_type error_range = /* æªææ */ ; static constexpr error_type error_space = /* æªææ */ ; static constexpr error_type error_badrepeat = /* æªææ */ ; static constexpr error_type error_complexity = /* æªææ */ ; static constexpr error_type error_stack = /* æªææ */ ;  }
ç±» std::regex_error
class regex_error : public std::runtime_error { public: explicit regex_error(regex_constants::error_type ecode); regex_constants::error_type code() const; };
ç±» std::regex_traits
template <class charT> struct regex_traits { public: typedef charT char_type; typedef std::basic_string<char_type> string_type; typedef std::locale locale_type; typedef /*bitmask_type*/ char_class_type; Â regex_traits(); static std::size_t length(const char_type* p); charT translate(charT c) const; charT translate_nocase(charT c) const; template <class ForwardIterator> string_type transform(ForwardIterator first, ForwardIterator last) const; template <class ForwardIterator> string_type transform_primary( ForwardIterator first, ForwardIterator last) const; template <class ForwardIterator> string_type lookup_collatename( ForwardIterator first, ForwardIterator last) const; template <class ForwardIterator> char_class_type lookup_classname( ForwardIterator first, ForwardIterator last, bool icase = false) const; bool isctype(charT c, char_class_type f) const; int value(charT ch, int radix) const; locale_type imbue(locale_type l); locale_type getloc()const; };
ç±» std::regex
template <class charT, class traits = regex_traits<charT> > class basic_regex { public: // ç±»åï¼ typedef charT value_type; typedef traits traits_type; typedef typename traits::string_type string_type; typedef regex_constants::syntax_option_type flag_type; typedef typename traits::locale_type locale_type;  // 常éï¼ static constexpr regex_constants::syntax_option_type icase = regex_constants::icase; static constexpr regex_constants::syntax_option_type nosubs = regex_constants::nosubs; static constexpr regex_constants::syntax_option_type optimize = regex_constants::optimize; static constexpr regex_constants::syntax_option_type collate = regex_constants::collate; static constexpr regex_constants::syntax_option_type ECMAScript = regex_constants::ECMAScript; static constexpr regex_constants::syntax_option_type basic = regex_constants::basic; static constexpr regex_constants::syntax_option_type extended = regex_constants::extended; static constexpr regex_constants::syntax_option_type awk = regex_constants::awk; static constexpr regex_constants::syntax_option_type grep = regex_constants::grep; static constexpr regex_constants::syntax_option_type egrep = regex_constants::egrep;  // æé /å¤å¶/éæ¯ï¼ basic_regex(); explicit basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript); basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); basic_regex(const basic_regex&); basic_regex(basic_regex&&) noexcept; template <class ST, class SA> explicit basic_regex(const basic_string<charT, ST, SA>& p, flag_type f = regex_constants::ECMAScript); template <class ForwardIterator> basic_regex(ForwardIterator first, ForwardIterator last, flag_type f = regex_constants::ECMAScript); basic_regex(initializer_list<charT>, flag_type = regex_constants::ECMAScript);  ~basic_regex(); basic_regex& operator=(const basic_regex&); basic_regex& operator=(basic_regex&&) noexcept; basic_regex& operator=(const charT* ptr); basic_regex& operator=(initializer_list<charT> il); template <class ST, class SA> basic_regex& operator=(const basic_string<charT, ST, SA>& p);  // èµå¼ï¼ basic_regex& assign(const basic_regex& that); basic_regex& assign(basic_regex&& that) noexcept; basic_regex& assign(const charT* ptr, flag_type f = regex_constants::ECMAScript); basic_regex& assign(const charT* p, size_t len, flag_type f); template <class string_traits, class A> basic_regex& assign(const basic_string<charT, string_traits, A>& s, flag_type f = regex_constants::ECMAScript); template <class InputIterator> basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::ECMAScript); basic_regex& assign(initializer_list<charT>, flag_type = regex_constants::ECMAScript);  // const æä½ï¼ unsigned mark_count() const; flag_type flags() const;  // æ¬å°ç¯å¢ï¼ locale_type imbue(locale_type loc); locale_type getloc() const;  // 交æ¢ï¼ void swap(basic_regex&); };
ç±» std::sub_match
template <class BidirectionalIterator> class sub_match : public std::pair<BidirectionalIterator, BidirectionalIterator> { public: typedef typename iterator_traits<BidirectionalIterator>:: value_type value_type; typedef typename iterator_traits<BidirectionalIterator>:: difference_type difference_type; typedef BidirectionalIterator iterator; typedef basic_string<value_type> string_type; Â bool matched; Â constexpr sub_match(); difference_type length() const; operator string_type() const; string_type str() const; Â int compare(const sub_match& s) const; int compare(const string_type& s) const; int compare(const value_type* s) const; };
ç±» std::match_results
template <class BidirectionalIterator, class Allocator = allocator<sub_match<BidirectionalIterator> > class match_results { public: typedef sub_match<BidirectionalIterator> value_type; typedef const value_type& const_reference; typedef const_reference reference; typedef /* ç±å®ç°å®ä¹ */ const_iterator; typedef const_iterator iterator; typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef typename allocator_traits<Allocator>::size_type size_type; typedef Allocator allocator_type; typedef typename iterator_traits<BidirectionalIterator>::value_type char_type; typedef basic_string<char_type> string_type;  // æé /å¤å¶/éæ¯ï¼ explicit match_results(const Allocator& a = Allocator()); match_results(const match_results& m); match_results(match_results&& m) noexcept; match_results& operator=(const match_results& m); match_results& operator=(match_results&& m); ~match_results();  // ç¶æï¼ bool ready() const;  // 大å°ï¼ size_type size() const; size_type max_size() const; bool empty() const;  // å ç´ è®¿é®ï¼ difference_type length(size_type sub = 0) const; difference_type position(size_type sub = 0) const; string_type str(size_type sub = 0) const; const_reference operator[](size_type n) const;  const_reference prefix() const; const_reference suffix() const; const_iterator begin() const; const_iterator end() const; const_iterator cbegin() const; const_iterator cend() const;  // æ ¼å¼ï¼ template <class OutputIter> OutputIter format(OutputIter out, const char_type* fmt_first, const char_type* fmt_last, regex_constants::match_flag_type flags = regex_constants::format_default) const; template <class OutputIter, class ST, class SA> OutputIter format(OutputIter out, const basic_string<char_type, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const; template <class ST, class SA> basic_string<char_type, ST, SA> format(const basic_string<char_type, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const; string_type format(const char_type* fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const;  // åé å¨ï¼ allocator_type get_allocator() const;  // 交æ¢ï¼ void swap(match_results& that);  };