Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is an old version of boost. Click here for the latest version's documentation home page.
PrevUpHomeNext

Function regex_search

boost::xpressive::regex_search — Determines whether there is some sub-sequence within [begin,end) that matches the regular expression re.

Synopsis

template<typename OtherBidiIter, typename BidiIter> 
  bool regex_search(OtherBidiIter begin, OtherBidiIter end, 
                    match_results< BidiIter > & what, 
                    basic_regex< BidiIter > const & re, 
                    regex_constants::match_flag_type flags = regex_constants::match_default);
template<typename OtherBidiIter, typename BidiIter> 
  bool regex_search(OtherBidiIter begin, OtherBidiIter 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, 
                    typename disable_if< is_pointer< BidiRange > >::type * = 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, 
                    typename disable_if< is_pointer< BidiRange > >::type * = 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, 
                    typename disable_if< is_pointer< BidiRange > >::type * = 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, 
                    typename disable_if< is_pointer< BidiRange > >::type * = 0);

Description

Determines whether there is some sub-sequence within [begin,end) that matches the regular expression re.

Parameters:

begin

The beginning of the sequence

end

The end of the sequence

flags

Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.)

re

The regular expression object to use

what

The match_results struct into which the sub_matches will be written

Requires:

Types BidiIter and OtherBidiIter meet the requirements of a Bidirectional Iterator (24.1.4).

OtherBidiIter is convertible to BidiIter.

[begin,end) denotes a valid iterator range.

Returns:

true if a match is found, false otherwise

Throws:


PrevUpHomeNext