Boost C++ Libraries Home Libraries People FAQ More

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

// In header: <boost/xpressive/regex_algorithms.hpp>


template<typename BidiIter> 
   ( begin,  end, 
                    match_results<  what, 
                    basic_regex<  re, 
                     flags = );
template<typename BidiIter> 
   ( begin,  end, 
                    basic_regex<  re, 
                     flags = );
template<typename Char> 
   ( begin, match_results<  what, 
                    basic_regex<  re, 
                     flags = );
template<typename BidiRange, typename BidiIter> 
   ( rng, match_results<  what, 
                    basic_regex<  re, 
                     flags = , 
                     = );
template<typename BidiRange, typename BidiIter> 
   ( rng, match_results<  what, 
                    basic_regex<  re, 
                     flags = , 
                     = );
template<typename Char> 
   ( begin, basic_regex<  re, 
                     flags = );
template<typename BidiRange, typename BidiIter> 
   ( rng, basic_regex<  re, 
                     flags = , 
                     = );
template<typename BidiRange, typename BidiIter> 
   ( rng, basic_regex<  re, 
                     flags = , 
                     = );

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:

Type BidiIter meets the requirements of a Bidirectional Iterator (24.1.4).

Requires:

[begin,end) denotes a valid iterator range.

Returns:

true if a match is found, false otherwise

Throws:

regex_error on stack exhaustion

PrevUpHomeNext