From 132c39a42cf9d7f0b03d8d39ad5d42bd0125ea63 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 15 May 2010 09:15:20 +0000 Subject: [PATCH] Update regex_match requirements. Fixes #4215. [SVN r61976] --- doc/history.qbk | 15 +++ .../background_information/examples.html | 6 +- .../background_information/history.html | 36 +++++-- .../background_information/locale.html | 8 +- .../background_information/standards.html | 10 +- doc/html/boost_regex/captures.html | 6 +- .../format/boost_format_syntax.html | 8 +- doc/html/boost_regex/install.html | 16 ++-- doc/html/boost_regex/ref/bad_expression.html | 4 +- doc/html/boost_regex/ref/basic_regex.html | 18 ++-- .../ref/concepts/traits_concept.html | 4 +- .../deprecated_interfaces/regex_format.html | 2 +- doc/html/boost_regex/ref/error_type.html | 4 +- doc/html/boost_regex/ref/match_flag_type.html | 2 +- doc/html/boost_regex/ref/match_results.html | 82 ++++++++++++++-- .../ref/non_std_strings/icu/unicode_algo.html | 6 +- .../ref/non_std_strings/icu/unicode_iter.html | 4 +- .../non_std_strings/mfc_strings/mfc_algo.html | 10 +- .../non_std_strings/mfc_strings/mfc_iter.html | 4 +- doc/html/boost_regex/ref/posix.html | 8 +- doc/html/boost_regex/ref/regex_iterator.html | 4 +- doc/html/boost_regex/ref/regex_match.html | 4 +- doc/html/boost_regex/ref/regex_replace.html | 4 +- doc/html/boost_regex/ref/regex_search.html | 4 +- .../boost_regex/ref/regex_token_iterator.html | 4 +- doc/html/boost_regex/ref/regex_traits.html | 2 +- doc/html/boost_regex/ref/sub_match.html | 8 +- .../boost_regex/syntax/basic_extended.html | 66 ++++++------- doc/html/boost_regex/syntax/basic_syntax.html | 44 ++++----- doc/html/boost_regex/syntax/perl_syntax.html | 96 +++++++++---------- doc/html/boost_regex/unicode.html | 4 +- doc/html/index.html | 4 +- doc/match_result.qbk | 50 +++++++++- 33 files changed, 348 insertions(+), 199 deletions(-) diff --git a/doc/history.qbk b/doc/history.qbk index e3a0a3dd..176140d6 100644 --- a/doc/history.qbk +++ b/doc/history.qbk @@ -15,6 +15,21 @@ Currently open issues can be viewed [@https://svn.boost.org/trac/boost/query?sta All issues including closed ones can be viewed [@https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=regex&order=priority&col=id&col=summary&col=status&col=type&col=milestone&col=component here]. +[h4 Boost 1.44] + +Fixed issues: +[@https://svn.boost.org/trac/boost/ticket/4215 #4215], +[@https://svn.boost.org/trac/boost/ticket/4212 #4212], +[@https://svn.boost.org/trac/boost/ticket/4191 #4191], +[@https://svn.boost.org/trac/boost/ticket/4132 #4132], +[@https://svn.boost.org/trac/boost/ticket/4123 #4123], +[@https://svn.boost.org/trac/boost/ticket/4114 #4114], +[@https://svn.boost.org/trac/boost/ticket/4036 #4036], +[@https://svn.boost.org/trac/boost/ticket/4020 #4020], +[@https://svn.boost.org/trac/boost/ticket/3941 #3941], +[@https://svn.boost.org/trac/boost/ticket/3902 #3902], +[@https://svn.boost.org/trac/boost/ticket/3890 #3890] + [h4 Boost 1.42] * Added support for Functors rather than strings as format expressions. diff --git a/doc/html/boost_regex/background_information/examples.html b/doc/html/boost_regex/background_information/examples.html index ce903688..36dd5a30 100644 --- a/doc/html/boost_regex/background_information/examples.html +++ b/doc/html/boost_regex/background_information/examples.html @@ -28,7 +28,7 @@ Example Programs
- + Test Programs
@@ -107,7 +107,7 @@ Files: captures_test.cpp.

- + Example programs
@@ -133,7 +133,7 @@ Files: regex_timer.cpp.

- + Code snippets
diff --git a/doc/html/boost_regex/background_information/history.html b/doc/html/boost_regex/background_information/history.html index 0c3cb23c..15470b00 100644 --- a/doc/html/boost_regex/background_information/history.html +++ b/doc/html/boost_regex/background_information/history.html @@ -26,7 +26,7 @@ History

- New issues should be submitted at svn.boost.org + New issues should be submitted at svn.boost.org - don't forget to include your email address in the ticket!

@@ -35,8 +35,26 @@

All issues including closed ones can be viewed here.

+
+ + Boost + 1.44 +
+

+ Fixed issues: #4215, + #4212, + #4191, + #4132, + #4123, + #4114, + #4036, + #4020, + #3941, + #3902, + #3890 +

- + Boost 1.42
@@ -65,7 +83,7 @@
- + Boost 1.40
@@ -74,7 +92,7 @@ branch resets and recursive regular expressions.
- + Boost 1.38
@@ -101,7 +119,7 @@
- + Boost 1.34
@@ -124,7 +142,7 @@
- + Boost 1.33.1
@@ -194,7 +212,7 @@
- + Boost 1.33.0
@@ -249,7 +267,7 @@
- + Boost 1.32.1
@@ -257,7 +275,7 @@ Fixed bug in partial matches of bounded repeats of '.'.
- + Boost 1.31.0
diff --git a/doc/html/boost_regex/background_information/locale.html b/doc/html/boost_regex/background_information/locale.html index 4b8f962c..31ce35f6 100644 --- a/doc/html/boost_regex/background_information/locale.html +++ b/doc/html/boost_regex/background_information/locale.html @@ -58,7 +58,7 @@ There are three separate localization mechanisms supported by Boost.Regex:

- + Win32 localization model.
@@ -90,7 +90,7 @@ are treated as "unknown" graphic characters.

- + C localization model.
@@ -114,7 +114,7 @@ libraries including version 1 of this library.

- + C++ localization model.
@@ -151,7 +151,7 @@ in your code. The best way to ensure this is to add the #define to <boost/regex/user.hpp>.

- + Providing a message catalogue
diff --git a/doc/html/boost_regex/background_information/standards.html b/doc/html/boost_regex/background_information/standards.html index 17ce4aca..3a443a23 100644 --- a/doc/html/boost_regex/background_information/standards.html +++ b/doc/html/boost_regex/background_information/standards.html @@ -28,7 +28,7 @@ Conformance
- + C++

@@ -36,7 +36,7 @@ Report on C++ Library Extensions.

- + ECMAScript / JavaScript
@@ -49,7 +49,7 @@ rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.

- + Perl

@@ -73,7 +73,7 @@ the Unicode requirements below.

- + POSIX

@@ -93,7 +93,7 @@ a custom traits class.

- + Unicode

diff --git a/doc/html/boost_regex/captures.html b/doc/html/boost_regex/captures.html index 7406acec..eb9398ff 100644 --- a/doc/html/boost_regex/captures.html +++ b/doc/html/boost_regex/captures.html @@ -35,7 +35,7 @@ accessed.

- + Marked sub-expressions

@@ -218,7 +218,7 @@ output stream.

- + Unmatched Sub-Expressions

@@ -231,7 +231,7 @@ you can determine which sub-expressions matched by accessing the sub_match::matched data member.

- + Repeated Captures

diff --git a/doc/html/boost_regex/format/boost_format_syntax.html b/doc/html/boost_regex/format/boost_format_syntax.html index b017ac87..283cef6d 100644 --- a/doc/html/boost_regex/format/boost_format_syntax.html +++ b/doc/html/boost_regex/format/boost_format_syntax.html @@ -32,7 +32,7 @@ '$', '\', '(', ')', '?', and ':'.

- + Grouping

@@ -40,7 +40,7 @@ you want a to output literal parenthesis.

- + Conditionals

@@ -79,7 +79,7 @@ ?{NAME}true-expression:false-expression

- + Placeholder Sequences
@@ -319,7 +319,7 @@ as a literal.

- + Escape Sequences
diff --git a/doc/html/boost_regex/install.html b/doc/html/boost_regex/install.html index d3e3325e..e5cc3919 100644 --- a/doc/html/boost_regex/install.html +++ b/doc/html/boost_regex/install.html @@ -49,7 +49,7 @@ file before you can use it, instructions for specific platforms are as follows:

- + Building with bjam

@@ -58,7 +58,7 @@ started guide for more information.

- + Building With Unicode and ICU Support
@@ -96,11 +96,11 @@ ICU you are using is binary compatible with the toolset you use to build Boost.

- + Building via makefiles
- + Borland C++ Builder:
- + GCC(2.95 and later)

@@ -302,7 +302,7 @@ see the config library documentation.

- + Sun Workshop 6.1

@@ -347,7 +347,7 @@ will build v9 variants of the regex library named libboost_regex_v9.a etc.

- + Makefiles for Other compilers
diff --git a/doc/html/boost_regex/ref/bad_expression.html b/doc/html/boost_regex/ref/bad_expression.html index c05df79a..02cef4bc 100644 --- a/doc/html/boost_regex/ref/bad_expression.html +++ b/doc/html/boost_regex/ref/bad_expression.html @@ -27,7 +27,7 @@ bad_expression
- + Synopsis
#include <boost/pattern_except.hpp>
@@ -54,7 +54,7 @@
 } // namespace boost
 
- + Description
regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos);
diff --git a/doc/html/boost_regex/ref/basic_regex.html b/doc/html/boost_regex/ref/basic_regex.html
index a0ab9a47..92d3b6c3 100644
--- a/doc/html/boost_regex/ref/basic_regex.html
+++ b/doc/html/boost_regex/ref/basic_regex.html
@@ -27,7 +27,7 @@
  basic_regex
 
 
- + Synopsis
#include <boost/regex.hpp>
@@ -244,7 +244,7 @@
 } // namespace boost
 
- + Description

@@ -327,7 +327,7 @@ basic_regex.

-

Table 1. basic_regex default construction postconditions

+

Table 1. basic_regex default construction postconditions

@@ -407,7 +407,7 @@ flags specified in f.

-

Table 2. Postconditions for basic_regex construction

+

Table 2. Postconditions for basic_regex construction

@@ -512,7 +512,7 @@ specified in f.

-

Table 3. Postconditions for basic_regex construction

+

Table 3. Postconditions for basic_regex construction

@@ -616,7 +616,7 @@ according the option flags specified in f.

-

Table 4. Postconditions for basic_regex construction

+

Table 4. Postconditions for basic_regex construction

@@ -727,7 +727,7 @@ flags specified in f.

-

Table 5. Postconditions for basic_regex construction

+

Table 5. Postconditions for basic_regex construction

@@ -829,7 +829,7 @@ flags specified in f.

-

Table 6. Postconditions for basic_regex construction

+

Table 6. Postconditions for basic_regex construction

@@ -1043,7 +1043,7 @@ in f.

-

Table 7. Postconditions for basic_regex::assign

+

Table 7. Postconditions for basic_regex::assign

diff --git a/doc/html/boost_regex/ref/concepts/traits_concept.html b/doc/html/boost_regex/ref/concepts/traits_concept.html index 61571515..01cb63c7 100644 --- a/doc/html/boost_regex/ref/concepts/traits_concept.html +++ b/doc/html/boost_regex/ref/concepts/traits_concept.html @@ -34,7 +34,7 @@ Boost-specific enhanced interface.

- + Minimal requirements.
@@ -381,7 +381,7 @@
- + Additional Optional Requirements
diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html index e0aa3d8b..7769e42c 100644 --- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html +++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html @@ -34,7 +34,7 @@ previous version of Boost.Regex and will not be further updated:

- + Algorithm regex_format
diff --git a/doc/html/boost_regex/ref/error_type.html b/doc/html/boost_regex/ref/error_type.html index 2661dae8..c2f2bc40 100644 --- a/doc/html/boost_regex/ref/error_type.html +++ b/doc/html/boost_regex/ref/error_type.html @@ -27,7 +27,7 @@ error_type
- + Synopsis

@@ -57,7 +57,7 @@ } // namespace boost

- + Description

diff --git a/doc/html/boost_regex/ref/match_flag_type.html b/doc/html/boost_regex/ref/match_flag_type.html index 58e7eb12..afceff37 100644 --- a/doc/html/boost_regex/ref/match_flag_type.html +++ b/doc/html/boost_regex/ref/match_flag_type.html @@ -69,7 +69,7 @@ } // namespace boost

- + Description

diff --git a/doc/html/boost_regex/ref/match_results.html b/doc/html/boost_regex/ref/match_results.html index 63a5ac15..b547b6f6 100644 --- a/doc/html/boost_regex/ref/match_results.html +++ b/doc/html/boost_regex/ref/match_results.html @@ -27,7 +27,7 @@ match_results

- + Synopsis
#include <boost/regex.hpp>
@@ -167,7 +167,7 @@
          match_results<BidirectionalIterator, Allocator>& m2);
 
- + Description

@@ -406,14 +406,21 @@ template <class charT, class Traits, class A> difference_type length(const std::basic_string<charT, Traits, A>&)const; +

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: Returns the length of sub-expression sub, that is to say: (*this)[sub].length().

The overloads that accept a string refer to a named sub-expression n. - In the event that there is no such named sub-expression then returns an empty - string. + In the event that there is no such named sub-expression then returns zero.

The template overloads of this function, allow the string and/or character @@ -434,6 +441,14 @@ template <class charT, class Traits, class A> difference_type position(const std::basic_string<charT, Traits, A>&)const; +

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: Returns the starting location of sub-expression sub, or -1 if sub @@ -443,8 +458,7 @@

The overloads that accept a string refer to a named sub-expression n. - In the event that there is no such named sub-expression then returns an empty - string. + In the event that there is no such named sub-expression then returns -1.

The template overloads of this function, allow the string and/or character @@ -467,6 +481,14 @@ template <class charT, class Traits, class A> string_type str(const std::basic_string<charT, Traits, A>& sub)const; +

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: Returns sub-expression sub as a string: string_type((*this)[sub]). @@ -497,6 +519,14 @@ template <class charT, class Traits, class A> const_reference operator[](const std::basic_string<charT, Traits, A>& n) const; +

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: Returns a reference to the sub_match object representing the character sequence that matched marked sub-expression @@ -527,6 +557,14 @@

const_reference prefix()const;
 
+

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: Returns a reference to the sub_match object representing the character sequence from the start of the string being @@ -536,6 +574,14 @@

const_reference suffix()const;
 
+

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: Returns a reference to the sub_match object representing the character sequence from the end of the match found @@ -584,6 +630,14 @@ want to pass function objects with internal state might want to use Boost.Ref to wrap the object so that it's passed by reference.

+

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: If fmt is either a null-terminated string, or a container of char_type's, @@ -643,6 +697,14 @@ to *out, and then return the new OutputIterator position.

+

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: If fmt is either a null-terminated string, or a container of char_type's, @@ -716,6 +778,14 @@

const capture_sequence_type& captures(std::size_t i)const; 
 
+

+ Requires: that the match_results object + has been initialized as a result of a successful call to regex_search or regex_match or was returned from + a regex_iterator, + and that the underlying iterators have not been subsequently invalidated. + Will raise a std::logic_error if the match_results object + was not initialized. +

Effects: returns a sequence containing all the captures obtained for sub-expression i. diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html index 81c8e7cd..eace8fdd 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html @@ -43,7 +43,7 @@ on to the "real" algorithm.

- + u32regex_match

@@ -89,7 +89,7 @@ }

- + u32regex_search

@@ -128,7 +128,7 @@ }

- + u32regex_replace

diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html index 32e20a8d..c6e20800 100644 --- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html +++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html @@ -28,7 +28,7 @@ Unicode Aware Regex Iterators

- + u32regex_iterator

@@ -126,7 +126,7 @@ Provided of course that the input is encoded as UTF-8.

- + u32regex_token_iterator

diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html index 805adf6c..325379c9 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html @@ -34,7 +34,7 @@ here they are anyway:

- + regex_match

@@ -82,7 +82,7 @@ }

- + regex_match (second overload)
@@ -110,7 +110,7 @@ }
- + regex_search

@@ -149,7 +149,7 @@ }

- + regex_search (second overload)
@@ -164,7 +164,7 @@ + s.GetLength(), e, f);

- + regex_replace

diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html index cedd2580..bbed7d5c 100644 --- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html +++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html @@ -32,7 +32,7 @@ an MFC/ATL string to a regex_iterator or regex_token_iterator:

- + regex_iterator creation helper
@@ -68,7 +68,7 @@ }
- + regex_token_iterator creation helpers
diff --git a/doc/html/boost_regex/ref/posix.html b/doc/html/boost_regex/ref/posix.html index 4117a6f7..6a5533d2 100644 --- a/doc/html/boost_regex/ref/posix.html +++ b/doc/html/boost_regex/ref/posix.html @@ -165,7 +165,7 @@

- + regcomp

@@ -379,7 +379,7 @@

- + regerror

@@ -467,7 +467,7 @@

- + regexec

@@ -537,7 +537,7 @@

- + regfree

diff --git a/doc/html/boost_regex/ref/regex_iterator.html b/doc/html/boost_regex/ref/regex_iterator.html index 25b27409..e8d29d44 100644 --- a/doc/html/boost_regex/ref/regex_iterator.html +++ b/doc/html/boost_regex/ref/regex_iterator.html @@ -78,7 +78,7 @@ regex_constants::match_flag_type m = regex_constants::match_default);

- + Description

@@ -436,7 +436,7 @@ m.

- + Examples

diff --git a/doc/html/boost_regex/ref/regex_match.html b/doc/html/boost_regex/ref/regex_match.html index 92e54980..b4e44f9f 100644 --- a/doc/html/boost_regex/ref/regex_match.html +++ b/doc/html/boost_regex/ref/regex_match.html @@ -80,7 +80,7 @@ match_flag_type flags = match_default);

- + Description
template <class BidirectionalIterator, class Allocator, class charT, class traits>
@@ -360,7 +360,7 @@
         Effects: Returns the result of regex_match(s.begin(), s.end(), e, flags).
       

- + Examples

diff --git a/doc/html/boost_regex/ref/regex_replace.html b/doc/html/boost_regex/ref/regex_replace.html index a3a8e7bb..c739efd5 100644 --- a/doc/html/boost_regex/ref/regex_replace.html +++ b/doc/html/boost_regex/ref/regex_replace.html @@ -53,7 +53,7 @@ match_flag_type flags = match_default);

- + Description
template <class OutputIterator, class BidirectionalIterator, class traits, class Formatter>
@@ -199,7 +199,7 @@
         and then returns result.
       

- + Examples

diff --git a/doc/html/boost_regex/ref/regex_search.html b/doc/html/boost_regex/ref/regex_search.html index 36edb25d..105d53af 100644 --- a/doc/html/boost_regex/ref/regex_search.html +++ b/doc/html/boost_regex/ref/regex_search.html @@ -73,7 +73,7 @@ match_flag_type flags = match_default);

- + Description
template <class BidirectionalIterator, class Allocator, class charT, class traits>
@@ -355,7 +355,7 @@
         Effects: Returns the result of regex_search(s.begin(), s.end(), e, flags).
       

- + Examples

diff --git a/doc/html/boost_regex/ref/regex_token_iterator.html b/doc/html/boost_regex/ref/regex_token_iterator.html index a2af4f26..cf389fbe 100644 --- a/doc/html/boost_regex/ref/regex_token_iterator.html +++ b/doc/html/boost_regex/ref/regex_token_iterator.html @@ -136,7 +136,7 @@ regex_constants::match_flag_type m = regex_constants::match_default);

- + Description

@@ -383,7 +383,7 @@ m.

- + Examples

diff --git a/doc/html/boost_regex/ref/regex_traits.html b/doc/html/boost_regex/ref/regex_traits.html index 7e3c06b6..92946119 100644 --- a/doc/html/boost_regex/ref/regex_traits.html +++ b/doc/html/boost_regex/ref/regex_traits.html @@ -46,7 +46,7 @@ } // namespace boost

- + Description

diff --git a/doc/html/boost_regex/ref/sub_match.html b/doc/html/boost_regex/ref/sub_match.html index cc49dc1a..3c906aea 100644 --- a/doc/html/boost_regex/ref/sub_match.html +++ b/doc/html/boost_regex/ref/sub_match.html @@ -329,11 +329,11 @@ } // namespace boost

- + Description
- + Members

@@ -473,7 +473,7 @@

- + sub_match non-member operators
@@ -1008,7 +1008,7 @@ + m2.str().

- + Stream inserter

diff --git a/doc/html/boost_regex/syntax/basic_extended.html b/doc/html/boost_regex/syntax/basic_extended.html index 97b80722..2c800c43 100644 --- a/doc/html/boost_regex/syntax/basic_extended.html +++ b/doc/html/boost_regex/syntax/basic_extended.html @@ -28,7 +28,7 @@ Expression Syntax

- + Synopsis

@@ -46,7 +46,7 @@

- + POSIX Extended Syntax

@@ -56,7 +56,7 @@

.[{()\*+?|^$
- + Wildcard:

@@ -74,7 +74,7 @@

- + Anchors:

@@ -86,7 +86,7 @@ of an expression, or the last character of a sub-expression.

- + Marked sub-expressions:
@@ -98,7 +98,7 @@ to by a back-reference.

- + Repeats:

@@ -184,7 +184,7 @@ cab operator to be applied to.

- + Back references:

@@ -214,7 +214,7 @@ cab

- + Alternation

@@ -227,7 +227,7 @@ cab will match either of "abd" or "abef".

- + Character sets:
@@ -240,7 +240,7 @@ cab A bracket expression may contain any combination of the following:

- + Single characters:
@@ -249,7 +249,7 @@ cab or 'c'.

- + Character ranges:
@@ -265,7 +265,7 @@ cab the code points of the characters only.

- + Negation:

@@ -274,7 +274,7 @@ cab range a-c.

- + Character classes:
@@ -284,7 +284,7 @@ cab character class names.

- + Collating Elements:
@@ -312,7 +312,7 @@ cab matches a NUL character.

- + Equivalence classes:
@@ -329,7 +329,7 @@ cab or even all locales on one platform.

- + Combinations:

@@ -337,7 +337,7 @@ cab [[:digit:]a-c[.NUL.]].

- + Escapes

@@ -363,7 +363,7 @@ cab extensions are also supported by Boost.Regex:

- + Escapes matching a specific character
@@ -552,7 +552,7 @@ cab
- + "Single character" character classes:
@@ -706,7 +706,7 @@ cab
- + Character Properties
@@ -813,7 +813,7 @@ cab matches any "digit" character, as does \p{digit}.

- + Word Boundaries

@@ -888,7 +888,7 @@ cab

- + Buffer boundaries
@@ -979,7 +979,7 @@ cab
- + Continuation Escape
@@ -991,7 +991,7 @@ cab match to start where the last one ended.

- + Quoting escape
@@ -1005,7 +1005,7 @@ cab \*+aaa
- + Unicode escapes
@@ -1056,7 +1056,7 @@ cab
- + Any other escape
@@ -1065,7 +1065,7 @@ cab \@ matches a literal '@'.

- + Operator precedence
@@ -1101,7 +1101,7 @@ cab
- + What Gets Matched
@@ -1111,11 +1111,11 @@ cab rule.

- + Variations

- + Egrep

@@ -1136,7 +1136,7 @@ cab used with the -E option.

- + awk

@@ -1150,7 +1150,7 @@ cab these by default anyway.

- + Options

@@ -1163,7 +1163,7 @@ cab modify how the case and locale sensitivity are to be applied.

- + References

diff --git a/doc/html/boost_regex/syntax/basic_syntax.html b/doc/html/boost_regex/syntax/basic_syntax.html index ff4e7d54..0b45b993 100644 --- a/doc/html/boost_regex/syntax/basic_syntax.html +++ b/doc/html/boost_regex/syntax/basic_syntax.html @@ -28,7 +28,7 @@ Expression Syntax

- + Synopsis

@@ -45,7 +45,7 @@

- + POSIX Basic Syntax

@@ -55,7 +55,7 @@

.[\*^$
- + Wildcard:

@@ -73,7 +73,7 @@

- + Anchors:

@@ -85,7 +85,7 @@ of an expression, or the last character of a sub-expression.

- + Marked sub-expressions:
@@ -97,7 +97,7 @@ by a back-reference.

- + Repeats:

@@ -155,7 +155,7 @@ aaaa to.

- + Back references:

@@ -173,7 +173,7 @@ aaaa

aaabba
- + Character sets:
@@ -186,7 +186,7 @@ aaaa A bracket expression may contain any combination of the following:

- + Single characters:
@@ -195,7 +195,7 @@ aaaa or 'c'.

- + Character ranges:
@@ -211,7 +211,7 @@ aaaa of the characters only.

- + Negation:

@@ -220,7 +220,7 @@ aaaa range a-c.

- + Character classes:
@@ -230,7 +230,7 @@ aaaa character class names.

- + Collating Elements:
@@ -259,7 +259,7 @@ aaaa element names.

- + Equivalence classes:
@@ -276,7 +276,7 @@ aaaa or even all locales on one platform.

- + Combinations:

@@ -284,7 +284,7 @@ aaaa [[:digit:]a-c[.NUL.]].

- + Escapes

@@ -299,7 +299,7 @@ aaaa will match either a literal '\' or a '^'.

- + What Gets Matched

@@ -309,13 +309,13 @@ aaaa rule.

- + Variations

- + Grep

@@ -333,7 +333,7 @@ aaaa As its name suggests, this behavior is consistent with the Unix utility grep.

- + emacs

@@ -613,7 +613,7 @@ aaaa leftmost-longest rule.

- + Options

@@ -627,7 +627,7 @@ aaaa options modify how the case and locale sensitivity are to be applied.

- + References

diff --git a/doc/html/boost_regex/syntax/perl_syntax.html b/doc/html/boost_regex/syntax/perl_syntax.html index 1b68cffe..269c0370 100644 --- a/doc/html/boost_regex/syntax/perl_syntax.html +++ b/doc/html/boost_regex/syntax/perl_syntax.html @@ -28,7 +28,7 @@ Syntax

- + Synopsis

@@ -43,7 +43,7 @@ boost::regex e2(my_expression, boost::regex::perl|boost::regex::icase);

- + Perl Regular Expression Syntax

@@ -53,7 +53,7 @@

.[{()\*+?|^$
- + Wildcard

@@ -73,7 +73,7 @@

- + Anchors

@@ -83,7 +83,7 @@ A '$' character shall match the end of a line.

- + Marked sub-expressions
@@ -94,7 +94,7 @@ can also repeated, or referred to by a back-reference.

- + Non-marking grouping
@@ -107,7 +107,7 @@ without splitting out any separate sub-expressions.

- + Repeats

@@ -188,7 +188,7 @@ to be applied to.

- + Non greedy repeats
@@ -218,7 +218,7 @@ while consuming as little input as possible.

- + Pocessive repeats
@@ -250,7 +250,7 @@ while giving nothing back.

- + Back references

@@ -360,7 +360,7 @@ named "two".

- + Alternation

@@ -387,7 +387,7 @@ (?:abc)?? has exactly the same effect.

- + Character sets

@@ -399,7 +399,7 @@ A bracket expression may contain any combination of the following:

- + Single characters

@@ -407,7 +407,7 @@ 'b', or 'c'.

- + Character ranges
@@ -421,7 +421,7 @@ sensitive.

- + Negation

@@ -430,7 +430,7 @@ matches any character that is not in the range a-c.

- + Character classes
@@ -441,7 +441,7 @@ class names.

- + Collating Elements
@@ -463,7 +463,7 @@ matches a \0 character.

- + Equivalence classes
@@ -480,7 +480,7 @@ or even all locales on one platform.

- + Escaped Characters
@@ -492,7 +492,7 @@ is not a "word" character.

- + Combinations

@@ -500,7 +500,7 @@ [[:digit:]a-c[.NUL.]].

- + Escapes

@@ -692,7 +692,7 @@

- + "Single character" character classes:
@@ -894,7 +894,7 @@
- + Character Properties
@@ -1002,7 +1002,7 @@ as does \p{digit}.

- + Word Boundaries

@@ -1021,7 +1021,7 @@ \B Matches only when not at a word boundary.

- + Buffer boundaries

@@ -1048,7 +1048,7 @@ (?=\n?\z).

- + Continuation Escape
@@ -1060,7 +1060,7 @@ one ended.

- + Quoting escape

@@ -1073,7 +1073,7 @@ \*+aaa

- + Unicode escapes

@@ -1083,7 +1083,7 @@ followed by a sequence of zero or more combining characters.

- + Matching Line Endings
@@ -1092,7 +1092,7 @@ sequence, specifically it is identical to the expression (?>\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}]).

- + Keeping back some text
@@ -1107,7 +1107,7 @@ This can be used to simulate variable width lookbehind assertions.

- + Any other escape
@@ -1116,7 +1116,7 @@ \@ matches a literal '@'.

- + Perl Extended Patterns
@@ -1125,7 +1125,7 @@ (?.

- + Named Subexpressions
@@ -1147,14 +1147,14 @@ format string for search and replace operations, or in the match_results member functions.

- + Comments

(?# ... ) is treated as a comment, it's contents are ignored.

- + Modifiers

@@ -1168,7 +1168,7 @@ pattern only.

- + Non-marking groups
@@ -1177,7 +1177,7 @@ an additional sub-expression.

- + Branch reset

@@ -1199,7 +1199,7 @@ # 1 2 2 3 2 3 4

- + Lookahead

@@ -1222,7 +1222,7 @@ could be used to validate the password.

- + Lookbehind

@@ -1236,7 +1236,7 @@ (pattern must be of fixed length).

- + Independent sub-expressions
@@ -1249,7 +1249,7 @@ no match is found at all.

- + Recursive Expressions
@@ -1273,7 +1273,7 @@ to the next sub-expression to be declared.

- + Conditional Expressions
@@ -1321,7 +1321,7 @@
- + Operator precedence
@@ -1356,7 +1356,7 @@

- + What gets matched

@@ -1531,7 +1531,7 @@

- + Variations

@@ -1540,7 +1540,7 @@ and JScript are all synonyms for perl.

- + Options

@@ -1552,7 +1552,7 @@ are to be applied.

- + Pattern Modifiers

@@ -1564,7 +1564,7 @@ and no_mod_s.

- + References

diff --git a/doc/html/boost_regex/unicode.html b/doc/html/boost_regex/unicode.html index 978001d7..1c47471f 100644 --- a/doc/html/boost_regex/unicode.html +++ b/doc/html/boost_regex/unicode.html @@ -30,7 +30,7 @@ There are two ways to use Boost.Regex with Unicode strings:

- + Rely on wchar_t

@@ -56,7 +56,7 @@

- + Use a Unicode Aware Regular Expression Type.
diff --git a/doc/html/index.html b/doc/html/index.html index c4f7fee0..b2334c42 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -28,7 +28,7 @@
-

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

@@ -196,7 +196,7 @@

- +

Last revised: March 17, 2010 at 16:59:52 GMT

Last revised: May 15, 2010 at 09:09:46 GMT


diff --git a/doc/match_result.qbk b/doc/match_result.qbk index 4238de92..eb4b7b69 100644 --- a/doc/match_result.qbk +++ b/doc/match_result.qbk @@ -221,11 +221,17 @@ stored in *this. template difference_type length(const std::basic_string&)const; + +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: Returns the length of sub-expression /sub/, that is to say: `(*this)[sub].length()`. The overloads that accept a string refer to a named sub-expression /n/. -In the event that there is no such named sub-expression then returns an empty string. +In the event that there is no such named sub-expression then returns zero. The template overloads of this function, allow the string and\/or character type to be different from the character type of the underlying sequence and\/or regular expression: @@ -244,12 +250,17 @@ Unicode character type. template difference_type position(const std::basic_string&)const; +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: Returns the starting location of sub-expression /sub/, or -1 if /sub/ was not matched. Note that if this represents a partial match , then `position()` will return the location of the partial match even though `(*this)[0].matched` is false. The overloads that accept a string refer to a named sub-expression /n/. -In the event that there is no such named sub-expression then returns an empty string. +In the event that there is no such named sub-expression then returns -1. The template overloads of this function, allow the string and\/or character type to be different from the character type of the underlying sequence and\/or regular expression: @@ -271,6 +282,11 @@ Unicode character type. template string_type str(const std::basic_string& sub)const; +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: Returns sub-expression /sub/ as a string: `string_type((*this)[sub])`. The overloads that accept a string, return the string that matched the named sub-expression /n/. @@ -296,6 +312,11 @@ Unicode character type. template const_reference operator[](const std::basic_string& n) const; +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: Returns a reference to the [sub_match] object representing the character sequence that matched marked sub-expression /n/. If `n == 0` then returns a reference to a [sub_match] object representing the character sequence that @@ -321,6 +342,11 @@ Unicode character type. const_reference prefix()const; +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: Returns a reference to the [sub_match] object representing the character sequence from the start of the string being matched or searched, to the start of the match found. @@ -330,6 +356,11 @@ start of the match found. const_reference suffix()const; +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: Returns a reference to the [sub_match] object representing the character sequence from the end of the match found to the end of the string being matched or searched. @@ -373,6 +404,11 @@ OutputIterator position. Note that if the formatter is a functor, then it is might want to use [@../../../../doc/html/ref.html Boost.Ref] to wrap the object so that it's passed by reference. +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: If `fmt` is either a null-terminated string, or a container of `char_type`'s, then copies the character sequence `[fmt.begin(), fmt.end())` to `OutputIterator` /out/. For each format specifier or escape sequence in @@ -414,6 +450,11 @@ replacement text, or either `fmt(*this, out)` or `fmt(*this, out, flags)`, both which write the replacement text to `*out`, and then return the new OutputIterator position. +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: If `fmt` is either a null-terminated string, or a container of `char_type`'s, then copies the string /fmt/: For each format specifier or @@ -465,6 +506,11 @@ rely on that. const capture_sequence_type& captures(std::size_t i)const; +[*Requires]: that the match_results object has been initialized as a result of a +successful call to [regex_search] or [regex_match] or was returned from a [regex_iterator], and +that the underlying iterators have not been subsequently invalidated. Will raise a +`std::logic_error` if the match_results object was not initialized. + [*Effects]: returns a sequence containing all the captures obtained for sub-expression i. [*Returns]: `(*this)[i].captures();`