boost::xpressive::regex_search — 确定 [begin,end)
范围内是否存在与正则表达式 re
匹配的子序列。
// In header: <boost/xpressive/regex_algorithms.hpp> template<typename BidiIter> bool regex_search(BidiIter begin, BidiIter end, match_results< BidiIter > & what, basic_regex< BidiIter > const & re, regex_constants::match_flag_type flags = regex_constants::match_default); template<typename BidiIter> bool regex_search(BidiIter begin, BidiIter end, basic_regex< BidiIter > const & re, regex_constants::match_flag_type flags = regex_constants::match_default); template<typename Char> bool regex_search(Char * begin, match_results< Char * > & what, basic_regex< Char * > const & re, regex_constants::match_flag_type flags = regex_constants::match_default); template<typename BidiRange, typename BidiIter> bool regex_search(BidiRange & rng, match_results< BidiIter > & what, basic_regex< BidiIter > const & re, regex_constants::match_flag_type flags = regex_constants::match_default, unspecified = 0); template<typename BidiRange, typename BidiIter> bool regex_search(BidiRange const & rng, match_results< BidiIter > & what, basic_regex< BidiIter > const & re, regex_constants::match_flag_type flags = regex_constants::match_default, unspecified = 0); template<typename Char> bool regex_search(Char * begin, basic_regex< Char * > const & re, regex_constants::match_flag_type flags = regex_constants::match_default); template<typename BidiRange, typename BidiIter> bool regex_search(BidiRange & rng, basic_regex< BidiIter > const & re, regex_constants::match_flag_type flags = regex_constants::match_default, unspecified = 0); template<typename BidiRange, typename BidiIter> bool regex_search(BidiRange const & rng, basic_regex< BidiIter > const & re, regex_constants::match_flag_type flags = regex_constants::match_default, unspecified = 0);
确定 [begin,end)
范围内是否存在与正则表达式 re
匹配的子序列。
参数 |
|
||||||||||
要求 |
类型 |
||||||||||
要求 |
|
||||||||||
返回值 |
如果找到匹配项,则返回 |
||||||||||
抛出 |
堆栈耗尽时抛出 regex_error |