From 515044821c73d0d10c97df23f7e939501a81fe95 Mon Sep 17 00:00:00 2001
From: John Maddock The template class basic_regex encapsulates regular
-expression parsing and compilation. The class takes three template
-parameters: charT: determines the character type, i.e. either
-char or wchar_t. traits: determines the behavior of the character
-type, for example which character class names are recognized. A
-default traits class is provided:
-regex_traits<charT>. Allocator: the allocator class used to allocate
-memory by the class. For ease of use there are two typedefs that define the two
-standard basic_regex instances, unless you want to use
-custom traits classes or allocators, you won't need to use anything
-other than these: The template class basic_regex encapsulates regular expression parsing
+ and compilation. The class takes three template parameters: charT: determines the character type, i.e. either char or
+ wchar_t. traits: determines the behavior of the character type, for
+ example which character class names are recognized. A default traits class is
+ provided: regex_traits<charT>. Allocator: the allocator class used to allocate memory by the
+ class. For ease of use there are two typedefs that define the two standard basic_regex
+ instances, unless you want to use custom traits classes or allocators, you
+ won't need to use anything other than these:
-
-
-
-
-
-
-
-
-
-Boost.Regex
-
-basic_regex
-
-
-
-
-
-
-
-
-Synopsis
-
-
+
+
+
+
+
+
+
+
+
+
+ Boost.Regex
+ basic_regex
+
+
+
+
+
+
+ Synopsis
+
#include <boost/regex.hpp>
-
-
+
namespace boost{
template <class charT, class traits = regex_traits<charT>, class Allocator = std::allocator<charT> >
class basic_regex;
@@ -66,12 +48,9 @@ other than these:
The definition of basic_regex follows: it is based very -closely on class basic_string, and fulfils the requirements for a -constant-container of charT.
- -+The definition of basic_regex follows: it is based very closely on class + basic_string, and fulfils the requirements for a constant-container of charT.
+namespace boost{ template <class charT, @@ -112,89 +91,86 @@ public: static const regex_constants::syntax_option_type perl = regex_constants::perl; // construct/copy/destroy: - explicit basic_regex(const Allocator& a = Allocator()); - explicit basic_regex(const charT* p, flag_type f = regex_constants::normal, + explicit basic_regex(const Allocator& a = Allocator()); + explicit basic_regex(const charT* p, flag_type f = regex_constants::normal, const Allocator& a = Allocator()); - basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal, + basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal, const Allocator& a = Allocator()); - basic_regex(const charT* p, size_type len, flag_type f, + basic_regex(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator()); - basic_regex(const basic_regex&); + basic_regex(const basic_regex&); template <class ST, class SA> - explicit basic_regex(const basic_string<charT, ST, SA>& p, + explicit basic_regex(const basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal, const Allocator& a = Allocator()); template <class InputIterator> - basic_regex(InputIterator first, inputIterator last, + basic_regex(InputIterator first, inputIterator last, flag_type f = regex_constants::normal, const Allocator& a = Allocator()); ~basic_regex(); - basic_regex& operator=(const basic_regex&); - basic_regex& operator=(const charT* ptr); - template <class ST, class SA> - basic_regex& operator=(const basic_string<charT, ST, SA>& p); - - // iterators: - const_iterator begin() const; - const_iterator end() const; - // capacity: - size_type size() const; - size_type max_size() const; - bool empty() const; - unsigned mark_count() const; - + basic_regex& operator=(const basic_regex&); + basic_regex& operator= (const charT* ptr); + template <class ST, class SA> + basic_regex& operator= (const basic_string<charT, ST, SA>& p); + // iterators: + const_iterator begin() const; + const_iterator end() const; + // capacity: + size_type size() const; + size_type max_size() const; + bool empty() const; + unsigned mark_count()const; // - // modifiers: - basic_regex& assign(const basic_regex& that); - basic_regex& assign(const charT* ptr, flag_type f = regex_constants::normal); - basic_regex& assign(const charT* first, const charT* last, - flag_type f = regex_constants::normal); + // modifiers: + basic_regex& assign(const basic_regex& that); + basic_regex& assign(const charT* ptr, flag_type f = regex_constants::normal); + basic_regex& assign(const charT* ptr, unsigned int len, flag_type f); template <class string_traits, class A> - basic_regex& assign(const basic_string<charT, string_traits, A>& s, + basic_regex& assign(const basic_string<charT, string_traits, A>& s, flag_type f = regex_constants::normal); template <class InputIterator> - basic_regex& assign(InputIterator first, InputIterator last, + basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::normal); // const operations: - Allocator get_allocator() const; - flag_type getflags() const; - basic_string<charT> str() const; - int compare(basic_regex&) const; + Allocator get_allocator() const; + flag_type flags() const; + basic_string<charT> str() const; + int compare(basic_regex&) const; // locale: - locale_type imbue(locale_type loc); - locale_type getloc() const; + locale_type imbue(locale_type loc); + locale_type getloc() const; // swap - void swap(basic_regex&) throw(); + void swap(basic_regex&) throw(); }; template <class charT, class traits, class Allocator> -bool operator == (const basic_regex<charT, traits, Allocator>& lhs, +bool operator == (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs); template <class charT, class traits, class Allocator> -bool operator != (const basic_regex<charT, traits, Allocator>& lhs, +bool operator != (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs); template <class charT, class traits, class Allocator> -bool operator < (const basic_regex<charT, traits, Allocator>& lhs, +bool operator < (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs); template <class charT, class traits, class Allocator> -bool operator <= (const basic_regex<charT, traits, Allocator>& lhs, +bool operator <= (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs); template <class charT, class traits, class Allocator> -bool operator >= (const basic_regex<charT, traits, Allocator>& lhs, +bool operator >= (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs); template <class charT, class traits, class Allocator> -bool operator > (const basic_regex<charT, traits, Allocator>& lhs, +bool operator > (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs); template <class charT, class io_traits, class re_traits, class Allocator> basic_ostream<charT, io_traits>& - operator << (basic_ostream<charT, io_traits>& os, + operator << (basic_ostream<charT, io_traits>& os, const basic_regex<charT, re_traits, Allocator>& e); template <class charT, class traits, class Allocator> -void swap(basic_regex<charT, traits, Allocator>& e1, +void swap(basic_regex<charT, traits, Allocator>& e1, basic_regex<charT, traits, Allocator>& e2); typedef basic_regex<char> regex; @@ -202,15 +178,10 @@ typedef basic_regex<wchar_t> wregex; } // namespace boost- -Description
- -Class basic_regex has the following public member -functions:
- -basic_regex constants
- -+Description
+Class basic_regex has the following public member functions:
+basic_regex constants
+static const regex_constants::syntax_option_type normal = regex_constants::normal; static const regex_constants::syntax_option_type icase = regex_constants::icase; static const regex_constants::syntax_option_type nosubs = regex_constants::nosubs; @@ -227,1067 +198,721 @@ static const regex_constants::syntax_option_type egrep = regex_constants::egrep; static const regex_constants::syntax_option_type sed = basic = regex_constants::sed; static const regex_constants::syntax_option_type perl = regex_constants::perl;- -The static constant members are provided as synonyms for the -constants declared in namespace
- --boost::regex_constants
; for each constant of type-syntax_option_type
declared in namespace-boost::regex_constants
then a constant with the same name, -type and value is declared within the scope of-basic_regex
.basic_regex constructors
- -In all
- -basic_regex
constructors, a copy of the -Allocator
argument is used for any memory allocation -performed by the constructor or member functions during the -lifetime of the object.+The static constant members are provided as synonyms for the constants declared + in namespace
+boost::regex_constants
; for each constant of type+ syntax_option_type
declared in namespaceboost::regex_constants
+ then a constant with the same name, type and value is declared within the scope + ofbasic_regex
.basic_regex constructors
+In all
+basic_regex
constructors, a copy of theAllocator
+ argument is used for any memory allocation performed by the constructor or + member functions during the lifetime of the object.basic_regex(const Allocator& a = Allocator());- - - -Effects: Constructs an object of class
- --basic_regex
. The postconditions of this function are -indicated in the table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -true
-- - -- -size()
-- -0
-- - -- -str()
-- -basic_string<charT>()
-+Effects: Constructs an object of class
+basic_regex
. The + postconditions of this function are indicated in the table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +true
++ ++ +size()
++ +0
++ + ++ +str()
++ +basic_string<charT>()
+basic_regex(const charT* p, flag_type f = regex_constants::normal, const Allocator& a = Allocator());- --basic_regex(const charT* p, flag_type f = regex_constants::normal, const Allocator& a = Allocator()); -- - - -Requires: p shall not be a null pointer.
- - - -Throws:
- - - -bad_expression
if p is not a -valid regular expression.Effects: Constructs an object of class
- - - --basic_regex
; the object's internal finite state machine is -constructed from the regular expression contained in the -null-terminated string p, and interpreted according to the -option flags specified -in f. The postconditions of this function are indicated in -the table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -false
-- - -- -size()
-- -char_traits<charT>::length(p)
-- - -- -str()
-- -basic_string<charT>(p)
-- - -- -getflags()
-- -f
-- - -- -mark_count()
-- -The number of marked sub-expressions within the expression.
-+Requires: p shall not be a null pointer.
+Throws:
+bad_expression
if p is not a valid regular + expression.Effects: Constructs an object of class
+basic_regex
; the + object's internal finite state machine is constructed from the regular + expression contained in the null-terminated string p, and interpreted + according to the option flags specified + in f. The postconditions of this function are indicated in the table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +false
++ ++ +size()
++ +char_traits<charT>::length(p)
++ ++ +str()
++ +basic_string<charT>(p)
++ ++ +flags()
++ +f
++ + ++ +mark_count()
++ +The number of marked sub-expressions within the expression.
+- --basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal, const Allocator& a = Allocator()); -- - - -Requires: p1 and p2 are not null pointers, -
- - - -p1 < p2
.Throws:
- - - -bad_expression
if [p1,p2) is not a -valid regular expression.Effects: Constructs an object of class
- - - --basic_regex
; the object's internal finite state machine is -constructed from the regular expression contained in the sequence -of characters [p1,p2), and interpreted according the option flags specified in f. -The postconditions of this function are indicated in the table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -false
-- - -- -size()
-- -std::distance(p1,p2)
-- - -- -str()
-- -basic_string<charT>(p1,p2)
-- - -- -getflags()
-- -f
-- - -- -mark_count()
-- -The number of marked sub-expressions within the expression.
-+basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal, const Allocator& a = Allocator());+Requires: p1 and p2 are not null pointers,
+p1 < p2
.Throws:
+bad_expression
if [p1,p2) is not a valid regular + expression.Effects: Constructs an object of class
+basic_regex
; the + object's internal finite state machine is constructed from the regular + expression contained in the sequence of characters [p1,p2), and interpreted + according the option flags specified in f. + The postconditions of this function are indicated in the table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +false
++ ++ +size()
++ +std::distance(p1,p2)
++ ++ +str()
++ +basic_string<charT>(p1,p2)
++ ++ +flags()
++ +f
++ + ++ +mark_count()
++ +The number of marked sub-expressions within the expression.
+- -+basic_regex(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator());- - - -Requires: p shall not be a null pointer,
- - - -len -< max_size()
.Throws:
- - - -bad_expression
if p is not a -valid regular expression.Effects: Constructs an object of class
- - - --basic_regex
; the object's internal finite state machine is -constructed from the regular expression contained in the sequence -of characters [p, p+len), and interpreted according the option flags specified in f. -The postconditions of this function are indicated in the table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -false
-- - -- -size()
-- -len
-- - -- -str()
-- -basic_string<charT>(p, len)
-- - -- -getflags()
-- -f
-- - -- -mark_count()
-- -The number of marked sub-expressions within the expression.
-+Requires: p shall not be a null pointer,
+len < max_size()
.Throws:
+bad_expression
if p is not a valid regular + expression.Effects: Constructs an object of class
+basic_regex
; the + object's internal finite state machine is constructed from the regular + expression contained in the sequence of characters [p, p+len), and interpreted + according the option flags specified in f. + The postconditions of this function are indicated in the table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +false
++ ++ +size()
++ +len
++ ++ +str()
++ +basic_string<charT>(p, len)
++ ++ +flags()
++ +f
++ + ++ +mark_count()
++ +The number of marked sub-expressions within the expression.
+- -+basic_regex(const basic_regex& e);- - - -Effects: Constructs an object of class
- - - --basic_regex
as a copy of the object e. The -postconditions of this function are indicated in the table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -e.empty()
-- - -- -size()
-- -e.size()
-- - -- -str()
-- -e.str()
-- - -- -getflags()
-- -e.getflags()
-- - -- -mark_count()
-- -e.mark_count()
-+Effects: Constructs an object of class
+basic_regex
as a + copy of the object e. The postconditions of this function are indicated + in the table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +e.empty()
++ ++ +size()
++ +e.size()
++ ++ +str()
++ +e.str()
++ ++ +flags()
++ +e.flags()
++ + ++ +mark_count()
++ +e.mark_count()
+- -+template <class ST, class SA> + basic_regex(const basic_string<charT, ST, SA>& s, flag_type f = regex_constants::normal, const Allocator& a = Allocator());- - - -Throws:
- - - -bad_expression
if s is not a -valid regular expression.Effects: Constructs an object of class
- - - --basic_regex
; the object's internal finite state machine is -constructed from the regular expression contained in the string -s, and interpreted according to the option flags specified in f. -The postconditions of this function are indicated in the table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -false
-- - -- -size()
-- -s.size()
-- - -- -str()
-- -s
-- - -- -getflags()
-- -f
-- - -- -mark_count()
-- -The number of marked sub-expressions within the expression.
-+Throws:
+bad_expression
if s is not a valid regular + expression.Effects: Constructs an object of class
+basic_regex
; the + object's internal finite state machine is constructed from the regular + expression contained in the string s, and interpreted according to the + option flags specified in f. The postconditions of this function + are indicated in the table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +false
++ ++ +size()
++ +s.size()
++ ++ +str()
++ +s
++ ++ +flags()
++ +f
++ + ++ +mark_count()
++ +The number of marked sub-expressions within the expression.
+- -+template <class ForwardIterator> + basic_regex(ForwardIterator first, ForwardIterator last, flag_type f = regex_constants::normal, const Allocator& a = Allocator());- - - -Throws:
- - - -bad_expression
if the sequence -[first, last) is not a valid regular expression.Effects: Constructs an object of class
- - - --basic_regex
; the object's internal finite state machine is -constructed from the regular expression contained in the sequence -of characters [first, last), and interpreted according to the option flags specified in -f. The postconditions of this function are indicated in the -table:- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -false
-- - -- -size()
-- -distance(first,last)
-- - -- -str()
-- -basic_string<charT>(first,last)
-- - -- -getflags()
-- -f
-- - -- -mark_count()
-- -The number of marked sub-expressions within the expression.
-+Throws:
+bad_expression
if the sequence [first, last) + is not a valid regular expression.Effects: Constructs an object of class
+basic_regex
; the + object's internal finite state machine is constructed from the regular + expression contained in the sequence of characters [first, last), and + interpreted according to the option flags + specified in f. The postconditions of this function are indicated in the + table:+++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +false
++ ++ +size()
++ +distance(first,last)
++ ++ +str()
++ +basic_string<charT>(first,last)
++ ++ +flags()
++ +f
++ + ++ +mark_count()
++ +The number of marked sub-expressions within the expression.
+- -+basic_regex& operator=(const basic_regex& e);- - - -Effects: Returns the result of
- -assign(e.str(), -e.getflags())
.+Effects: Returns the result of
+assign(e.str(), e.flags())
.basic_regex& operator=(const charT* ptr);- - - -Requires: p shall not be a null pointer.
- - - -Effects: Returns the result of
- --assign(ptr)
.+Requires: p shall not be a null pointer.
+Effects: Returns the result of
+assign(ptr)
.template <class ST, class SA> basic_regex& operator=(const basic_string<charT, ST, SA>& p);- - - -Effects: Returns the result of
- --assign(p)
.basic_regex iterators
- -+Effects: Returns the result of
+assign(p)
.basic_regex iterators
+const_iterator begin() const;- - - -Effects: Returns a starting iterator to a sequence of -characters representing the regular expression.
- -+Effects: Returns a starting iterator to a sequence of characters + representing the regular expression.
+const_iterator end() const;- - - -Effects: Returns termination iterator to a sequence of -characters representing the regular expression.
- -basic_regex capacity
- -+Effects: Returns termination iterator to a sequence of characters + representing the regular expression.
+basic_regex capacity
+size_type size() const;- - - -Effects: Returns the length of the sequence of characters -representing the regular expression.
- -+Effects: Returns the length of the sequence of characters representing + the regular expression.
+size_type max_size() const;- - - -Effects: Returns the maximum length of the sequence of -characters representing the regular expression.
- -+Effects: Returns the maximum length of the sequence of characters + representing the regular expression.
+bool empty() const;- - - -Effects: Returns true if the object does not -contain a valid regular expression, otherwise false.
- --unsigned mark_count() const; +Effects: Returns true if the object does not contain a valid + regular expression, otherwise false.
+unsigned mark_count() const;- - - -Effects: Returns the number of marked sub-expressions -within the regular expresion.
- -basic_regex assign
- -+Effects: Returns the number of marked sub-expressions within the regular + expresion.
+basic_regex assign
+basic_regex& assign(const basic_regex& that);- - - -Effects: Returns
- -assign(that.str(), -that.getflags())
.+Effects: Returns
+assign(that.str(), that.flags())
.basic_regex& assign(const charT* ptr, flag_type f = regex_constants::normal);- - - -Effects: Returns
- -assign(string_type(ptr), -f)
.-basic_regex& assign(const charT* first, const charT* last, +Effects: Returns
+assign(string_type(ptr), f)
.basic_regex& assign(const charT* ptr, unsigned int len, flag_type f);+Effects: Returns
+assign(string_type(ptr, len), f)
.template <class string_traits, class A> +basic_regex& assign(const basic_string<charT, string_traits, A>& s, flag_type f = regex_constants::normal); -- - - -Effects: Returns
- -assign(string_type(first, last), -f)
.-template <class string_traits, class A> -basic_regex& assign(const basic_string<charT, string_traits, A>& s, - flag_type f = regex_constants::normal); -- - - -Throws:
- - - -bad_expression
if s is not a -valid regular expression.Returns:
- - - -*this
.Effects: Assigns the regular expression contained in the -string s, interpreted according the option flags specified in f. -The postconditions of this function are indicated in the table:
- - - -- -
-
-- -- -
-- - -- - -Element
-- - -Value
-- - -- -empty()
-- -false
-- - -- -size()
-- -s.size()
-- - -- -str()
-- -s
-- - -- -getflags()
-- -f
-- - -- -mark_count()
-- -The number of marked sub-expressions within the expression.
-++Throws:
+bad_expression
if s is not a valid regular + expression.Returns:
+*this
.Effects: Assigns the regular expression contained in the string s, + interpreted according the option flags specified + in f. The postconditions of this function are indicated in the table:
++++ ++ +
++ ++ +Element
++ +Value
++ ++ +empty()
++ +false
++ ++ +size()
++ +s.size()
++ ++ +str()
++ +s
++ ++ +flags()
++ +f
++ + ++ +mark_count()
++ +The number of marked sub-expressions within the expression.
+- --template <class InputIterator> +template <class InputIterator> basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::normal);- - - -Requires: The type InputIterator corresponds to the Input -Iterator requirements (24.1.1).
- - - -Effects: Returns
- -assign(string_type(first, last), -f)
.basic_regex constant operations
- --Allocator get_allocator() const; +Requires: The type InputIterator corresponds to the Input Iterator + requirements (24.1.1).
+Effects: Returns
+assign(string_type(first, last), f)
.basic_regex constant operations
+Allocator get_allocator() const;- - - -Effects: Returns a copy of the Allocator that was passed -to the object's constructor.
- --flag_type getflags() const; +Effects: Returns a copy of the Allocator that was passed to the object's + constructor.
+flag_type flags() const;- - - -Effects: Returns a copy of the regular expression syntax -flags that were passed to the object's constructor, or the last -call to
- -assign.
-basic_string<charT> str() const; +Effects: Returns a copy of the regular expression syntax flags that were + passed to the object's constructor, or the last call to
+assign.
basic_string<charT> str() const;- - - -Effects: Returns a copy of the character sequence passed -to the object's constructor, or the last call to
- --assign.
-int compare(basic_regex& e)const; +Effects: Returns a copy of the character sequence passed to the object's + constructor, or the last call to
+assign.
int compare(basic_regex& e)const;- - - -Effects: If
- -getflags() == e.getflags()
then -returnsstr().compare(e.str())
, otherwise returns -getflags() - e.getflags()
.basic_regex locale
- --locale_type imbue(locale_type l); +Effects: If
+flags() == e.flags()
then returnsstr().compare(e.str())
, + otherwise returnsflags() - e.flags()
.basic_regex locale
+locale_type imbue(locale_type l);- - - -Effects: Returns the result of
- - - --traits_inst.imbue(l)
wheretraits_inst
is a -(default initialized) instance of the template parameter-traits
stored within the object. Calls to imbue invalidate -any currently contained regular expression.Postcondition:
- -empty() == true
.+Effects: Returns the result of
+traits_inst.imbue(l)
where+ traits_inst
is a (default initialized) instance of the template + parametertraits
stored within the object. Calls to imbue + invalidate any currently contained regular expression.Postcondition:
+empty() == true
.locale_type getloc() const;- - - -Effects: Returns the result of
- --traits_inst.getloc()
wheretraits_inst
is a -(default initialized) instance of the template parameter-traits
stored within the object.basic_regex swap
- -+Effects: Returns the result of
+traits_inst.getloc()
where+ traits_inst
is a (default initialized) instance of the template + parametertraits
stored within the object.basic_regex swap
+void swap(basic_regex& e) throw();- - - -Effects: Swaps the contents of the two regular -expressions.
- - - -Postcondition:
- - - -*this
contains the characters -that were in e, e contains the regular expression -that was in*this
.Complexity: constant time.
- -basic_regex non-member functions
- -basic_regex non-member comparison operators
- -+Effects: Swaps the contents of the two regular expressions.
+Postcondition:
+*this
contains the characters that were in e, + e contains the regular expression that was in*this
.Complexity: constant time.
+basic_regex non-member functions
+basic_regex non-member comparison operators
+Comparisons between basic_regex objects are provided on an experimental basis: + please note that these are likely to be removed from the standard library + proposal, so use with care if you are writing portable code.
+template <class charT, class traits, class Allocator> bool operator == (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: Returns
- -lhs.compare(rhs) == 0
.+Effects: Returns
+lhs.compare(rhs) == 0
.template <class charT, class traits, class Allocator> bool operator != (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: Returns
- -lhs.compare(rhs) != 0
.+Effects: Returns
+lhs.compare(rhs) != 0
.template <class charT, class traits, class Allocator> bool operator < (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: Returns
- -lhs.compare(rhs) < -0
.+Effects: Returns
+lhs.compare(rhs) < 0
.template <class charT, class traits, class Allocator> bool operator <= (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: Returns
- -lhs.compare(rhs) <= -0
.+Effects: Returns
+lhs.compare(rhs) <= 0
.template <class charT, class traits, class Allocator> bool operator >= (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: Returns
- -lhs.compare(rhs) >= -0
.+Effects: Returns
+lhs.compare(rhs) >= 0
.template <class charT, class traits, class Allocator> bool operator > (const basic_regex<charT, traits, Allocator>& lhs, const basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: Returns
- -lhs.compare(rhs) > -0
.basic_regex inserter.
- -+Effects: Returns
+lhs.compare(rhs) > 0
.basic_regex inserter.
+The basic_regex stream inserter is provided on an experimental basis, and + outputs the textual representation of the expression to the stream:
+template <class charT, class io_traits, class re_traits, class Allocator> basic_ostream<charT, io_traits>& operator << (basic_ostream<charT, io_traits>& os const basic_regex<charT, re_traits, Allocator>& e);- - - -Effects: Returns (os << e.str()).
- -basic_regex non-member swap
- -+Effects: Returns (os << e.str()).
+basic_regex non-member swap
+template <class charT, class traits, class Allocator> void swap(basic_regex<charT, traits, Allocator>& lhs, basic_regex<charT, traits, Allocator>& rhs);- - - -Effects: calls
- -lhs.swap(rhs)
.
-Revised - -17 May 2003 -
- -© Copyright John -Maddock 1998- - -2003 -
- -Permission to use, copy, modify, distribute and -sell this software and its documentation for any purpose is hereby -granted without fee, provided that the above copyright notice -appear in all copies and that both that copyright notice and this -permission notice appear in supporting documentation. Dr John -Maddock makes no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty.
- +Effects: calls
+lhs.swap(rhs)
.
+Revised + + 17 May 2003 +
+© Copyright John Maddock 1998- + + 2003 +
+Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, provided + that the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting documentation. + Dr John Maddock makes no representations about the suitability of this software + for any purpose. It is provided "as is" without express or implied warranty.
+ - - diff --git a/doc/Attic/contacts.html b/doc/Attic/contacts.html index 2f12281e..e24e93ac 100644 --- a/doc/Attic/contacts.html +++ b/doc/Attic/contacts.html @@ -1,110 +1,85 @@ - -Boost.Regex: Contacts - - - - - - - -
- |
-
-Boost.Regex- -Contacts and Acknowledgements- |
-
- |
-
The author can be contacted at -john_maddock@compuserve.com, the home page for this library is -at -http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm, -and the official boost version can be obtained from www.boost.org/libraries.htm.
- -I am indebted to Robert Sedgewick's "Algorithms in C++" for -forcing me to think about algorithms and their performance, and to -the folks at boost for forcing me to think, period. The -following people have all contributed useful comments or fixes: -Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian, -Jan Bölsche, Beman Dawes, Paul Baxter, David Bergman, David -Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno, -Tobias Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick -Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy, Jan Hermelink, -Max Leung, Wei-hao Lin, Jens Maurer, Richard Peters, Heiko Schmidt, -Jason Shirk, Gerald Slacik, Scobie Smith, Mike Smyth, Alexander -Sokolovsky, Hervé Poirier, Michael Raykh, Marc Recht, Scott -VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward, -Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to -the manuals supplied with the Henry Spencer, Perl and GNU regular -expression libraries - wherever possible I have tried to maintain -compatibility with these libraries and with the POSIX standard - -the code however is entirely my own, including any bugs! I can -absolutely guarantee that I will not fix any bugs I don't know -about, so if you have any comments or spot any bugs, please get in -touch.
- -Useful further information can be found at:
- -A short tutorial on regular expressions can be -found here.
- -The Open Unix -Specification contains a wealth of useful material, including -the regular expression syntax, and specifications for -<regex.h> and -<nl_types.h>.
- -The Pattern -Matching Pointers site is a "must visit" resource for anyone -interested in pattern matching.
- -Glimpse and Agrep, -use a simplified regular expression syntax to achieve faster search -times.
- -Udi Manber -and Ricardo -Baeza-Yates both have a selection of useful pattern matching -papers available from their respective web sites.
- - - -Revised -17 May 2003 -
- -© Copyright John -Maddock 1998- -2003 -
- -Permission to use, copy, modify, distribute and -sell this software and its documentation for any purpose is hereby -granted without fee, provided that the above copyright notice -appear in all copies and that both that copyright notice and this -permission notice appear in supporting documentation. Dr John -Maddock makes no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty.
- + +
+ |
+
+ Boost.Regex+Contacts and Acknowledgements+ |
+
+ |
+
The author can be contacted at john@johnmaddock.co.uk; the + home page for this library is at www.boost.org.
+I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think + about algorithms and their performance, and to the folks at boost for forcing + me to think, period. The following people have all contributed useful + comments or fixes: Dave Abrahams, Mike Allison, Edan Ayal, Jayashree + Balasubramanian, Jan Bölsche, Beman Dawes, Paul Baxter, David Bergman, David + Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno, Tobias + Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick Hodapp, Jesse Jones, + Martin Jost, Boris Krasnovskiy, Jan Hermelink, Max Leung, Wei-hao Lin, Jens + Maurer, Richard Peters, Heiko Schmidt, Jason Shirk, Gerald Slacik, Scobie + Smith, Mike Smyth, Alexander Sokolovsky, Hervé Poirier, Michael Raykh, Marc + Recht, Scott VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward, + Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to the manuals + supplied with the Henry Spencer, Perl and GNU regular expression libraries - + wherever possible I have tried to maintain compatibility with these libraries + and with the POSIX standard - the code however is entirely my own, including + any bugs! I can absolutely guarantee that I will not fix any bugs I don't know + about, so if you have any comments or spot any bugs, please get in touch.
+Useful further information can be found at:
+Short tutorials on regular expressions can be + found here and here.
+The main book on regular expressions is + Mastering Regular Expressions, published by O'Reilly.
+Information on the + Boost.regex standardization proposal, along with other + standard library extension proposals can be found on the + C++ Committees web pages.
+TheOpen Unix + Specification contains a wealth of useful material, including the + regular expression syntax, and specifications for + <regex.h> and + <nl_types.h>.
+The Pattern Matching Pointers + site is a "must visit" resource for anyone interested in pattern matching.
+Glimpse and Agrep, use a + simplified regular expression syntax to achieve faster search times.
+Udi Manber and + Ricardo Baeza-Yates both have a selection of useful pattern matching + papers available from their respective web sites.
+ +Revised + + 17 May 2003 +
+© Copyright John Maddock 1998- + + 2003 +
+Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, provided + that the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting documentation. + Dr John Maddock makes no representations about the suitability of this software + for any purpose. It is provided "as is" without express or implied warranty.
+ diff --git a/doc/Attic/history.html b/doc/Attic/history.html index 17ca695c..36eb7ac7 100644 --- a/doc/Attic/history.html +++ b/doc/Attic/history.html @@ -27,17 +27,20 @@Boost 1.31.0.