Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template regex_iterator

boost::xpressive::regex_iterator

Synopsis

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

template<typename BidiIter> 
struct regex_iterator {
  // types
  typedef basic_regex<                ;       
  typedef match_results<              ;       
  typedef  ;  
  typedef                    ;          
  typedef                    ;        
  typedef              ;

  // construct/copy/destruct
  ();
  (, , basic_regex< , 
                  = );
  template<typename LetExpr> 
    (, , basic_regex< , 
                   ,  = );
  (regex_iterator< );
  regex_iterator<  (regex_iterator< );

  // public member functions
   () ;
   () ;
  regex_iterator<  ();
  regex_iterator<  ();
};

Description

regex_iterator public construct/copy/destruct

  1. ();
  2. ( begin,  end, 
                   basic_regex<  rex, 
                    flags = );
  3. template<typename LetExpr> 
      ( begin,  end, 
                     basic_regex<  rex,  args, 
                      flags = );
  4. (regex_iterator<  that);
  5. regex_iterator<  
    (regex_iterator<  that);

regex_iterator public member functions

  1.  () ;
  2.  () ;
  3. regex_iterator<  ();

    If what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then behaves as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If no further match is found then sets *this equal to the end of sequence iterator.

    Postconditions:

    (*this)->size() == pre->mark_count() + 1

    Postconditions:

    (*this)->empty() == false

    Postconditions:

    (*this)->prefix().first == An iterator denoting the end point of the previous match found

    Postconditions:

    (*this)->prefix().last == (**this)[0].first

    Postconditions:

    (*this)->prefix().matched == (*this)->prefix().first != (*this)->prefix().second

    Postconditions:

    (*this)->suffix().first == (**this)[0].second

    Postconditions:

    (*this)->suffix().last == end

    Postconditions:

    (*this)->suffix().matched == (*this)->suffix().first != (*this)->suffix().second

    Postconditions:

    (**this)[0].first == The starting iterator for this match.

    Postconditions:

    (**this)[0].second == The ending iterator for this match.

    Postconditions:

    (**this)[0].matched == true if a full match was found, and false if it was a partial match (found as a result of the match_partial flag being set).

    Postconditions:

    (**this)[n].first == For all integers n < (*this)->size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end.

    Postconditions:

    (**this)[n].second == For all integers n < (*this)->size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end.

    Postconditions:

    (**this)[n].matched == For all integers n < (*this)->size(), true if sub-expression n participated in the match, false otherwise.

    Postconditions:

    (*this)->position() == The distance from the start of the original sequence being iterated, to the start of this match.

  4. regex_iterator<  ();

PrevUpHomeNext