| Home | Libraries | People | FAQ | More

## Reference

### Header <boost/xpressive/basic_regex.hpp>

Contains the definition of the basic_regex<> class template and its associated helper functions.

    namespace boost {
      namespace xpressive {
        template<typename BidiIter> struct basic_regex;
        template<typename BidiIter>
          void swap(basic_regex< BidiIter > &, basic_regex< BidiIter > &);
      }
    }

### Header <boost/xpressive/traits/c_regex_traits.hpp>

Contains the definition of the c_regex_traits<> template, which is a wrapper for the C locale functions that can be used to customize the behavior of static and dynamic regexes.

    namespace boost {
      namespace xpressive {
        template<typename Char> struct c_regex_traits;
      }
    }

### Header <boost/xpressive/traits/cpp_regex_traits.hpp>

Contains the definition of the cpp_regex_traits<> template, which is a wrapper for std::locale that can be used to customize the behavior of static and dynamic regexes.

    namespace boost {
      namespace xpressive {
        template<typename Char> struct cpp_regex_traits;
      }
    }

### Header <boost/xpressive/match_results.hpp>

Contains the definition of the match_results type and associated helpers. The match_results type holds the results of a regex_match() or regex_search() operation.

    namespace boost {
      namespace xpressive {
        template<typename BidiIter> struct match_results;
        template<typename BidiIter> struct regex_id_filter_predicate;
      }
    }

### Header <boost/xpressive/traits/null_regex_traits.hpp>

Contains the definition of the null_regex_traits<> template, which is a stub regex traits implementation that can be used by static and dynamic regexes for searching non-character data.

    namespace boost {
      namespace xpressive {
        template<typename Elem> struct null_regex_traits;
      }
    }

### Header <boost/xpressive/regex_algorithms.hpp>

Contains the regex_match(), regex_search() and regex_replace() algorithms.

    namespace boost {
      namespace xpressive {
        template<typename OtherBidiIter, typename BidiIter>
          bool regex_match(OtherBidiIter, OtherBidiIter,
                           match_results< BidiIter > &,
                           basic_regex< BidiIter > const &,
                           regex_constants::match_flag_type = regex_constants::match_default);
        template<typename OtherBidiIter, typename BidiIter>
          bool regex_match(OtherBidiIter, OtherBidiIter,
                           basic_regex< BidiIter > const &,
                           regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char>
          bool regex_match(Char const *, match_results< Char const * > &,
                           basic_regex< Char const * > const &,
                           regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char, typename Traits, typename Alloc>
          bool regex_match(std::basic_string< Char, Traits, Alloc > const &,
                           match_results< typename std::basic_string< Char, Traits, Alloc >::const_iterator > &,
                           basic_regex< typename std::basic_string< Char, Traits, Alloc >::const_iterator > const &,
                           regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char>
          bool regex_match(Char const *, basic_regex< Char const * > const &,
                           regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char, typename Traits, typename Alloc>
          bool regex_match(std::basic_string< Char, Traits, Alloc > const &,
                           basic_regex< typename std::basic_string< Char, Traits, Alloc >::const_iterator > const &,
                           regex_constants::match_flag_type = regex_constants::match_default);
        template<typename OtherBidiIter, typename BidiIter>
          bool regex_search(OtherBidiIter, OtherBidiIter,
                            match_results< BidiIter > &,
                            basic_regex< BidiIter > const &,
                            regex_constants::match_flag_type = regex_constants::match_default);
        template<typename OtherBidiIter, typename BidiIter>
          bool regex_search(OtherBidiIter, OtherBidiIter,
                            basic_regex< BidiIter > const &,
                            regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char>
          bool regex_search(Char const *, match_results< Char const * > &,
                            basic_regex< Char const * > const &,
                            regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char, typename Traits, typename Alloc>
          bool regex_search(std::basic_string< Char, Traits, Alloc > const &,
                            match_results< typename std::basic_string< Char, Traits, Alloc >::const_iterator > &,
                            basic_regex< typename std::basic_string< Char, Traits, Alloc >::const_iterator > const &,
                            regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char>
          bool regex_search(Char const *, basic_regex< Char const * > const &,
                            regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char, typename Traits, typename Alloc>
          bool regex_search(std::basic_string< Char, Traits, Alloc > const &,
                            basic_regex< typename std::basic_string< Char, Traits, Alloc >::const_iterator > const &,
                            regex_constants::match_flag_type = regex_constants::match_default);
        template<typename OutIter, typename OtherBidiIter, typename BidiIter>
          OutIter regex_replace(OutIter, OtherBidiIter, OtherBidiIter,
                                basic_regex< BidiIter > const &,
                                std::basic_string< typename iterator_value< BidiIter >::type > const &,
                                regex_constants::match_flag_type = regex_constants::match_default);
        template<typename Char>
          std::basic_string< Char >
          regex_replace(std::basic_string< Char > const &,
                        basic_regex< typename std::basic_string< Char >::const_iterator > const &,
                        std::basic_string< Char > const &,
                        regex_constants::match_flag_type = regex_constants::match_default);
      }
    }

### Header <boost/xpressive/regex_compiler.hpp>

Contains the definition of regex_compiler, a factory for building regex objects from strings.

    namespace boost {
      namespace xpressive {
        template<typename BidiIter, typename RegexTraits, typename CompilerTraits>
          struct regex_compiler;
      }
    }

### Header <boost/xpressive/regex_constants.hpp>

Contains definitions for the syntax_option_type, match_flag_type and error_type enumerations.

    namespace boost {
      namespace xpressive {
        namespace regex_constants {
          enum syntax_option_type;
          enum match_flag_type;
          enum error_type;
        }
      }
    }

### Header <boost/xpressive/regex_error.hpp>

Contains the definition of the regex_error exception class.

    namespace boost {
      namespace xpressive {
        struct regex_error;
      }
    }

### Header <boost/xpressive/regex_iterator.hpp>

Contains the definition of the regex_iterator type, an STL-compatible iterator for stepping through all the matches in a sequence.

    namespace boost {
      namespace xpressive {
        template<typename BidiIter> struct regex_iterator;
      }
    }

### Header <boost/xpressive/regex_primitives.hpp>

Contains the syntax elements for writing static regular expressions.

    namespace boost {
      namespace xpressive {
        unsigned int const  inf;
        unspecified nil;
        unspecified alnum;
        unspecified alpha;
        unspecified blank;
        unspecified cntrl;
        unspecified digit;
        unspecified graph;
        unspecified lower;
        unspecified print;
        unspecified punct;
        unspecified space;
        unspecified upper;
        unspecified xdigit;
        unspecified bos;
        unspecified eos;
        unspecified bol;
        unspecified eol;
        unspecified bow;
        unspecified eow;
        unspecified _b;
        unspecified _w;
        unspecified _d;
        unspecified _s;
        unspecified _n;
        unspecified _ln;
        unspecified _;
        unspecified self;
        unspecified set;
        unspecified s0;
        unspecified s1;
        unspecified s2;
        unspecified s3;
        unspecified s4;
        unspecified s5;
        unspecified s6;
        unspecified s7;
        unspecified s8;
        unspecified s9;
        template<typename Literal> unspecified as_xpr(Literal const &);
        template<typename Xpr> unspecified icase(Xpr const &);
        template<typename BidiIter>
          unspecified by_ref(basic_regex< BidiIter > const &);
        template<typename Char> unspecified range(Char, Char);
        template<typename Xpr> unspecified optional(Xpr const &);
        template<unsigned int Min, unsigned int Max, typename Xpr>
          unspecified repeat(Xpr const &);
        template<unsigned int Count, typename Xpr2>
          unspecified repeat(Xpr2 const &);
        template<typename Xpr> unspecified keep(Xpr const &);
        template<typename Xpr> unspecified before(Xpr const &);
        template<typename Xpr> unspecified after(Xpr const &);
        template<typename Locale> unspecified imbue(Locale const &);
      }
    }

### Header <boost/xpressive/regex_token_iterator.hpp>

Contains the definition of regex_token_iterator, and STL-compatible iterator for tokenizing a string using a regular expression.

    namespace boost {
      namespace xpressive {
        template<typename BidiIter> struct regex_token_iterator;
      }
    }

### Header <boost/xpressive/regex_traits.hpp>

Includes the C regex traits or the CPP regex traits header file depending on the BOOST_XPRESSIVE_USE_C_TRAITS macro.

    namespace boost {
      namespace xpressive {
        template<typename Char, typename Impl> struct regex_traits;
        struct regex_traits_version_1_case_fold_tag;
        struct regex_traits_version_1_tag;
      }
    }

### Header <boost/xpressive/sub_match.hpp>

Contains the definition of the class template sub_match<> and associated helper functions

    namespace boost {
      namespace xpressive {
        template<typename BidiIter> struct sub_match;
        template<typename BidiIter, typename Char, typename Traits>
          std::basic_ostream< Char, Traits > &
          operator<<(std::basic_ostream< Char, Traits > &,
                     sub_match< BidiIter > const &);
        template<typename BidiIter>
          bool operator==(sub_match< BidiIter > const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator!=(sub_match< BidiIter > const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator<(sub_match< BidiIter > const & lhs,
                         sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator<=(sub_match< BidiIter > const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator>=(sub_match< BidiIter > const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator>(sub_match< BidiIter > const & lhs,
                         sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator==(typename iterator_value< BidiIter >::type const * lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator!=(typename iterator_value< BidiIter >::type const * lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator<(typename iterator_value< BidiIter >::type const * lhs,
                         sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator>(typename iterator_value< BidiIter >::type const * lhs,
                         sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator>=(typename iterator_value< BidiIter >::type const * lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator<=(typename iterator_value< BidiIter >::type const * lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator==(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const * rhs);
        template<typename BidiIter>
          bool operator!=(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const * rhs);
        template<typename BidiIter>
          bool operator<(sub_match< BidiIter > const & lhs,
                         typename iterator_value< BidiIter >::type const * rhs);
        template<typename BidiIter>
          bool operator>(sub_match< BidiIter > const & lhs,
                         typename iterator_value< BidiIter >::type const * rhs);
        template<typename BidiIter>
          bool operator>=(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const * rhs);
        template<typename BidiIter>
          bool operator<=(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const * rhs);
        template<typename BidiIter>
          bool operator==(typename iterator_value< BidiIter >::type const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator!=(typename iterator_value< BidiIter >::type const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator<(typename iterator_value< BidiIter >::type const & lhs,
                         sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator>(typename iterator_value< BidiIter >::type const & lhs,
                         sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator>=(typename iterator_value< BidiIter >::type const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator<=(typename iterator_value< BidiIter >::type const & lhs,
                          sub_match< BidiIter > const & rhs);
        template<typename BidiIter>
          bool operator==(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const & rhs);
        template<typename BidiIter>
          bool operator!=(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const & rhs);
        template<typename BidiIter>
          bool operator<(sub_match< BidiIter > const & lhs,
                         typename iterator_value< BidiIter >::type const & rhs);
        template<typename BidiIter>
          bool operator>(sub_match< BidiIter > const & lhs,
                         typename iterator_value< BidiIter >::type const & rhs);
        template<typename BidiIter>
          bool operator>=(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const & rhs);
        template<typename BidiIter>
          bool operator<=(sub_match< BidiIter > const & lhs,
                          typename iterator_value< BidiIter >::type const & rhs);
      }
    }

### Header <boost/xpressive/xpressive.hpp>

Includes all of xpressive including support for both static and dynamic regular expressions.

### Header <boost/xpressive/xpressive_dynamic.hpp>

Includes everything you need to write and use dynamic regular expressions.

### Header <boost/xpressive/xpressive_fwd.hpp>

Forward declarations for all of xpressive's public data types.

    namespace boost {
      namespace xpressive {
        typedef void const * regex_id_type;
        typedef basic_regex< std::string::const_iterator > sregex;
        typedef basic_regex< char const * > cregex;
        typedef basic_regex< std::wstring::const_iterator > wsregex;
        typedef basic_regex< wchar_t const * > wcregex;
        typedef regex_compiler< std::string::const_iterator > sregex_compiler;
        typedef regex_compiler< char const * > cregex_compiler;
        typedef regex_compiler< std::wstring::const_iterator > wsregex_compiler;
        typedef regex_compiler< wchar_t const * > wcregex_compiler;
        typedef regex_iterator< std::string::const_iterator > sregex_iterator;
        typedef regex_iterator< char const * > cregex_iterator;
        typedef regex_iterator< std::wstring::const_iterator > wsregex_iterator;
        typedef regex_iterator< wchar_t const * > wcregex_iterator;
        typedef regex_token_iterator< std::string::const_iterator > sregex_token_iterator;
        typedef regex_token_iterator< char const * > cregex_token_iterator;
        typedef regex_token_iterator< std::wstring::const_iterator > wsregex_token_iterator;
        typedef regex_token_iterator< wchar_t const * > wcregex_token_iterator;
        typedef match_results< std::string::const_iterator > smatch;
        typedef match_results< char const * > cmatch;
        typedef match_results< std::wstring::const_iterator > wsmatch;
        typedef match_results< wchar_t const * > wcmatch;
        typedef regex_id_filter_predicate< std::string::const_iterator > sregex_id_filter_predicate;
        typedef regex_id_filter_predicate< char const * > cregex_id_filter_predicate;
        typedef regex_id_filter_predicate< std::wstring::const_iterator > wsregex_id_filter_predicate;
        typedef regex_id_filter_predicate< wchar_t const * > wcregex_id_filter_predicate;
      }
    }

### Header <boost/xpressive/xpressive_static.hpp>

Includes everything you need to write static regular expressions and use them.

### Header <boost/xpressive/xpressive_typeof.hpp>

Type registrations so that xpressive can be used with the Boost.Typeof library.

| Copyright © 2003, 2004 Eric Niebler