Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55383 - in branches/release: boost/regex boost/regex/v4 libs/regex libs/regex/build libs/regex/doc libs/regex/doc/html libs/regex/doc/html/boost_regex libs/regex/doc/html/boost_regex/background_information libs/regex/doc/html/boost_regex/configuration libs/regex/doc/html/boost_regex/format libs/regex/doc/html/boost_regex/ref libs/regex/doc/html/boost_regex/ref/concepts libs/regex/doc/html/boost_regex/ref/deprecated_interfaces libs/regex/doc/html/boost_regex/ref/non_std_strings libs/regex/doc/html/boost_regex/ref/non_std_strings/icu libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings libs/regex/doc/html/boost_regex/ref/syntax_option_type libs/regex/doc/html/boost_regex/syntax libs/regex/doc/html/boost_regex/syntax/character_classes libs/regex/doc/html/boost_regex/syntax/collating_names libs/regex/src libs/regex/test libs/regex/test/named_subexpressions libs/regex/test/regress
From: john_at_[hidden]
Date: 2009-08-03 08:00:21


Author: johnmaddock
Date: 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
New Revision: 55383
URL: http://svn.boost.org/trac/boost/changeset/55383

Log:
Merge updates from Trunk.
Fixes #2713.
Added:
   branches/release/libs/regex/test/named_subexpressions/
      - copied from r55382, /trunk/libs/regex/test/named_subexpressions/
   branches/release/libs/regex/test/named_subexpressions/named_subexpressions_test.cpp
      - copied unchanged from r55382, /trunk/libs/regex/test/named_subexpressions/named_subexpressions_test.cpp
Properties modified:
   branches/release/boost/regex/ (props changed)
   branches/release/libs/regex/ (props changed)
Text files modified:
   branches/release/boost/regex/concepts.hpp | 36 +
   branches/release/boost/regex/config.hpp | 2
   branches/release/boost/regex/icu.hpp | 12
   branches/release/boost/regex/v4/basic_regex.hpp | 158 ++++++++
   branches/release/boost/regex/v4/basic_regex_creator.hpp | 106 +++++
   branches/release/boost/regex/v4/basic_regex_parser.hpp | 449 +++++++++++++++++++++++
   branches/release/boost/regex/v4/cpp_regex_traits.hpp | 34 +
   branches/release/boost/regex/v4/iterator_category.hpp | 4
   branches/release/boost/regex/v4/match_results.hpp | 164 ++++++++
   branches/release/boost/regex/v4/perl_matcher.hpp | 30 +
   branches/release/boost/regex/v4/perl_matcher_common.hpp | 80 +--
   branches/release/boost/regex/v4/perl_matcher_non_recursive.hpp | 247 ++++++++++++
   branches/release/boost/regex/v4/perl_matcher_recursive.hpp | 146 +++++++
   branches/release/boost/regex/v4/regex_format.hpp | 183 +++++++++
   branches/release/boost/regex/v4/regex_traits_defaults.hpp | 50 ++
   branches/release/boost/regex/v4/regex_workaround.hpp | 2
   branches/release/boost/regex/v4/states.hpp | 5
   branches/release/boost/regex/v4/syntax_type.hpp | 5
   branches/release/boost/regex/v4/w32_regex_traits.hpp | 12
   branches/release/libs/regex/build/Jamfile.v2 | 6
   branches/release/libs/regex/doc/format_boost_syntax.qbk | 27 +
   branches/release/libs/regex/doc/format_perl_syntax.qbk | 13
   branches/release/libs/regex/doc/history.qbk | 5
   branches/release/libs/regex/doc/html/boost_regex/background_information.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/acknowledgements.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/examples.html | 8
   branches/release/libs/regex/doc/html/boost_regex/background_information/faq.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/futher.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/headers.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/history.html | 25
   branches/release/libs/regex/doc/html/boost_regex/background_information/locale.html | 10
   branches/release/libs/regex/doc/html/boost_regex/background_information/performance.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/redist.html | 2
   branches/release/libs/regex/doc/html/boost_regex/background_information/standards.html | 12
   branches/release/libs/regex/doc/html/boost_regex/background_information/thread_safety.html | 2
   branches/release/libs/regex/doc/html/boost_regex/captures.html | 8
   branches/release/libs/regex/doc/html/boost_regex/configuration.html | 2
   branches/release/libs/regex/doc/html/boost_regex/configuration/algorithm.html | 2
   branches/release/libs/regex/doc/html/boost_regex/configuration/compiler.html | 2
   branches/release/libs/regex/doc/html/boost_regex/configuration/linkage.html | 2
   branches/release/libs/regex/doc/html/boost_regex/configuration/locale.html | 2
   branches/release/libs/regex/doc/html/boost_regex/configuration/tuning.html | 2
   branches/release/libs/regex/doc/html/boost_regex/format.html | 2
   branches/release/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html | 168 ++++++++
   branches/release/libs/regex/doc/html/boost_regex/format/perl_format.html | 135 +++++++
   branches/release/libs/regex/doc/html/boost_regex/format/sed_format.html | 2
   branches/release/libs/regex/doc/html/boost_regex/install.html | 18
   branches/release/libs/regex/doc/html/boost_regex/introduction_and_overview.html | 2
   branches/release/libs/regex/doc/html/boost_regex/partial_matches.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/bad_expression.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/basic_regex.html | 20
   branches/release/libs/regex/doc/html/boost_regex/ref/concepts.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/concepts/charT_concept.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/concepts/iterator_concepts.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html | 4
   branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/error_type.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/match_flag_type.html | 4
   branches/release/libs/regex/doc/html/boost_regex/ref/match_results.html | 115 +++++
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/intro.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html | 8
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html | 12
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/posix.html | 10
   branches/release/libs/regex/doc/html/boost_regex/ref/regex_iterator.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/regex_match.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/regex_replace.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/regex_search.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html | 6
   branches/release/libs/regex/doc/html/boost_regex/ref/regex_traits.html | 4
   branches/release/libs/regex/doc/html/boost_regex/ref/sub_match.html | 10
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html | 2
   branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/basic_extended.html | 68 +-
   branches/release/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html | 46 +-
   branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/std_char_clases.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/digraphs.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/named_unicode.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/leftmost_longest_rule.html | 2
   branches/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html | 749 ++++++++++++++++++++++++++-------------
   branches/release/libs/regex/doc/html/boost_regex/unicode.html | 6
   branches/release/libs/regex/doc/html/index.html | 6
   branches/release/libs/regex/doc/match_result.qbk | 95 +++++
   branches/release/libs/regex/doc/syntax_perl.qbk | 310 +++++++++++-----
   branches/release/libs/regex/src/c_regex_traits.cpp | 10
   branches/release/libs/regex/src/icu.cpp | 8
   branches/release/libs/regex/src/regex_traits_defaults.cpp | 13
   branches/release/libs/regex/src/usinstances.cpp | 3
   branches/release/libs/regex/src/wc_regex_traits.cpp | 13
   branches/release/libs/regex/test/Jamfile.v2 | 4
   branches/release/libs/regex/test/regress/main.cpp | 3
   branches/release/libs/regex/test/regress/test.hpp | 4
   branches/release/libs/regex/test/regress/test_backrefs.cpp | 48 ++
   branches/release/libs/regex/test/regress/test_deprecated.cpp | 4
   branches/release/libs/regex/test/regress/test_escapes.cpp | 18
   branches/release/libs/regex/test/regress/test_non_greedy_repeats.cpp | 1
   branches/release/libs/regex/test/regress/test_perl_ex.cpp | 243 ++++++++++++
   branches/release/libs/regex/test/regress/test_replace.cpp | 58 +++
   branches/release/libs/regex/test/regress/test_sets.cpp | 4
   branches/release/libs/regex/test/regress/test_simple_repeats.cpp | 41 ++
   123 files changed, 3561 insertions(+), 701 deletions(-)

Modified: branches/release/boost/regex/concepts.hpp
==============================================================================
--- branches/release/boost/regex/concepts.hpp (original)
+++ branches/release/boost/regex/concepts.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -844,6 +844,42 @@
       m_string = m_char + m_sub;
       ignore_unused_variable_warning(m_string);
 
+ // Named sub-expressions:
+ m_sub = m_cresults[&m_char];
+ ignore_unused_variable_warning(m_sub);
+ m_sub = m_cresults[m_string];
+ ignore_unused_variable_warning(m_sub);
+ m_sub = m_cresults[""];
+ ignore_unused_variable_warning(m_sub);
+ m_sub = m_cresults[std::string("")];
+ ignore_unused_variable_warning(m_sub);
+ m_string = m_cresults.str(&m_char);
+ ignore_unused_variable_warning(m_string);
+ m_string = m_cresults.str(m_string);
+ ignore_unused_variable_warning(m_string);
+ m_string = m_cresults.str("");
+ ignore_unused_variable_warning(m_string);
+ m_string = m_cresults.str(std::string(""));
+ ignore_unused_variable_warning(m_string);
+
+ typename match_results_type::difference_type diff;
+ diff = m_cresults.length(&m_char);
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.length(m_string);
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.length("");
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.length(std::string(""));
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.position(&m_char);
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.position(m_string);
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.position("");
+ ignore_unused_variable_warning(diff);
+ diff = m_cresults.position(std::string(""));
+ ignore_unused_variable_warning(diff);
+
 #ifndef BOOST_NO_STD_LOCALE
       m_stream << m_sub;
       m_stream << m_cresults;

Modified: branches/release/boost/regex/config.hpp
==============================================================================
--- branches/release/boost/regex/config.hpp (original)
+++ branches/release/boost/regex/config.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -164,7 +164,7 @@
 # pragma warning(push)
 # pragma warning(disable : 4251 4231 4660)
 # endif
-# ifdef _DLL
+# if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
 # include <string>
       extern template class __declspec(dllimport) std::basic_string<unsigned short>;
 # endif

Modified: branches/release/boost/regex/icu.hpp
==============================================================================
--- branches/release/boost/regex/icu.hpp (original)
+++ branches/release/boost/regex/icu.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -184,7 +184,9 @@
       offset_underscore = U_CHAR_CATEGORY_COUNT+3,
       offset_unicode = U_CHAR_CATEGORY_COUNT+4,
       offset_any = U_CHAR_CATEGORY_COUNT+5,
- offset_ascii = U_CHAR_CATEGORY_COUNT+6
+ offset_ascii = U_CHAR_CATEGORY_COUNT+6,
+ offset_horizontal = U_CHAR_CATEGORY_COUNT+7,
+ offset_vertical = U_CHAR_CATEGORY_COUNT+8
    };
 
    //
@@ -197,6 +199,8 @@
    static const char_class_type mask_unicode;
    static const char_class_type mask_any;
    static const char_class_type mask_ascii;
+ static const char_class_type mask_horizontal;
+ static const char_class_type mask_vertical;
 
    static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
 
@@ -311,12 +315,12 @@
                               boost::regex_constants::syntax_option_type opt,
                               const boost::mpl::int_<4>*)
 {
- typedef std::vector<UCHAR32> vector_type;
+ typedef std::vector<UChar32> vector_type;
    vector_type v;
    while(i != j)
    {
- v.push_back((UCHAR32)(*i));
- ++a;
+ v.push_back((UChar32)(*i));
+ ++i;
    }
    if(v.size())
       return u32regex(&*v.begin(), v.size(), opt);

Modified: branches/release/boost/regex/v4/basic_regex.hpp
==============================================================================
--- branches/release/boost/regex/v4/basic_regex.hpp (original)
+++ branches/release/boost/regex/v4/basic_regex.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -19,6 +19,9 @@
 #ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
 #define BOOST_REGEX_V4_BASIC_REGEX_HPP
 
+#include <boost/type_traits/is_same.hpp>
+#include <boost/functional/hash.hpp>
+
 #ifdef BOOST_MSVC
 #pragma warning(push)
 #pragma warning(disable: 4103)
@@ -44,12 +47,160 @@
 template <class charT, class traits>
 class basic_regex_parser;
 
+template <class I>
+void bubble_down_one(I first, I last)
+{
+ if(first != last)
+ {
+ I next = last - 1;
+ while((next != first) && !(*(next-1) < *next))
+ {
+ (next-1)->swap(*next);
+ --next;
+ }
+ }
+}
+
+//
+// Class named_subexpressions
+// Contains information about named subexpressions within the regex.
+//
+template <class charT>
+class named_subexpressions_base
+{
+public:
+ virtual int get_id(const charT* i, const charT* j)const = 0;
+ virtual int get_id(std::size_t hash)const = 0;
+#ifdef __GNUC__
+ // warning supression:
+ virtual ~named_subexpressions_base(){}
+#endif
+};
+
+template <class Iterator>
+inline std::size_t hash_value_from_capture_name(Iterator i, Iterator j)
+{
+ std::size_t r = boost::hash_range(i, j);
+ r %= ((std::numeric_limits<int>::max)() - 10001);
+ r += 10000;
+ return r;
+}
+
+template <class charT>
+class named_subexpressions : public named_subexpressions_base<charT>
+{
+ struct name
+ {
+ name(const charT* i, const charT* j, int idx)
+ : /*n(i, j), */ index(idx)
+ {
+ hash = hash_value_from_capture_name(i, j);
+ }
+ name(std::size_t h, int idx)
+ : index(idx), hash(h)
+ {
+ }
+ //std::vector<charT> n;
+ int index;
+ std::size_t hash;
+ bool operator < (const name& other)const
+ {
+ return hash < other.hash; //std::lexicographical_compare(n.begin(), n.end(), other.n.begin(), other.n.end());
+ }
+ bool operator == (const name& other)const
+ {
+ return hash == other.hash; //n == other.n;
+ }
+ void swap(name& other)
+ {
+ //n.swap(other.n);
+ std::swap(index, other.index);
+ std::swap(hash, other.hash);
+ }
+ };
+public:
+ named_subexpressions(){}
+ void set_name(const charT* i, const charT* j, int index)
+ {
+ m_sub_names.push_back(name(i, j, index));
+ bubble_down_one(m_sub_names.begin(), m_sub_names.end());
+ }
+ int get_id(const charT* i, const charT* j)const
+ {
+ name t(i, j, 0);
+ typename std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
+ if((pos != m_sub_names.end()) && (*pos == t))
+ {
+ return pos->index;
+ }
+ return -1;
+ }
+ int get_id(std::size_t h)const
+ {
+ name t(h, 0);
+ typename std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
+ if((pos != m_sub_names.end()) && (*pos == t))
+ {
+ return pos->index;
+ }
+ return -1;
+ }
+private:
+ std::vector<name> m_sub_names;
+};
+
+template <class charT, class Other>
+class named_subexpressions_converter : public named_subexpressions_base<charT>
+{
+ boost::shared_ptr<named_subexpressions<Other> > m_converter;
+public:
+ named_subexpressions_converter(boost::shared_ptr<named_subexpressions<Other> > s)
+ : m_converter(s) {}
+ int get_id(const charT* i, const charT* j)const
+ {
+ if(i == j)
+ return -1;
+ std::vector<Other> v;
+ while(i != j)
+ {
+ v.push_back(*i);
+ ++i;
+ }
+ return m_converter->get_id(&v[0], &v[0] + v.size());
+ }
+ int get_id(std::size_t h)const
+ {
+ return m_converter->get_id(h);
+ }
+};
+
+template <class To>
+inline boost::shared_ptr<named_subexpressions_base<To> > convert_to_named_subs_imp(
+ boost::shared_ptr<named_subexpressions<To> > s,
+ boost::integral_constant<bool,true> const&)
+{
+ return s;
+}
+template <class To, class From>
+inline boost::shared_ptr<named_subexpressions_base<To> > convert_to_named_subs_imp(
+ boost::shared_ptr<named_subexpressions<From> > s,
+ boost::integral_constant<bool,false> const&)
+{
+ return boost::shared_ptr<named_subexpressions_converter<To, From> >(new named_subexpressions_converter<To, From>(s));
+}
+template <class To, class From>
+inline boost::shared_ptr<named_subexpressions_base<To> > convert_to_named_subs(
+ boost::shared_ptr<named_subexpressions<From> > s)
+{
+ typedef typename boost::is_same<To, From>::type tag_type;
+ return convert_to_named_subs_imp<To>(s, tag_type());
+}
 //
 // class regex_data:
 // represents the data we wish to expose to the matching algorithms.
 //
 template <class charT, class traits>
-struct regex_data
+struct regex_data : public named_subexpressions<charT>
 {
    typedef regex_constants::syntax_option_type flag_type;
    typedef std::size_t size_type;
@@ -77,6 +228,7 @@
    std::vector<
       std::pair<
       std::size_t, std::size_t> > m_subs; // Position of sub-expressions within the *string*.
+ bool m_has_recursions; // whether we have recursive expressions;
 };
 //
 // class basic_regex_implementation
@@ -520,6 +672,10 @@
       BOOST_ASSERT(0 != m_pimpl.get());
       return m_pimpl->get_data();
    }
+ boost::shared_ptr<re_detail::named_subexpressions<charT> > get_named_subs()const
+ {
+ return m_pimpl;
+ }
 
 private:
    shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl;

Modified: branches/release/boost/regex/v4/basic_regex_creator.hpp
==============================================================================
--- branches/release/boost/regex/v4/basic_regex_creator.hpp (original)
+++ branches/release/boost/regex/v4/basic_regex_creator.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -240,6 +240,7 @@
    bool m_has_backrefs; // true if there are actually any backrefs
    unsigned m_backrefs; // bitmask of permitted backrefs
    boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for;
+ bool m_has_recursions; // set when we have recursive expresisons to fixup
    typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
    typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character
    typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character
@@ -250,6 +251,7 @@
    basic_regex_creator(const basic_regex_creator&);
 
    void fixup_pointers(re_syntax_base* state);
+ void fixup_recursions(re_syntax_base* state);
    void create_startmaps(re_syntax_base* state);
    int calculate_backstep(re_syntax_base* state);
    void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask);
@@ -263,7 +265,7 @@
 
 template <class charT, class traits>
 basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
- : m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0)
+ : m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false)
 {
    m_pdata->m_data.clear();
    m_pdata->m_status = ::boost::regex_constants::error_ok;
@@ -692,6 +694,13 @@
    m_pdata->m_first_state = static_cast<re_syntax_base*>(m_pdata->m_data.data());
    // fixup pointers in the machine:
    fixup_pointers(m_pdata->m_first_state);
+ if(m_has_recursions)
+ {
+ m_pdata->m_has_recursions = true;
+ fixup_recursions(m_pdata->m_first_state);
+ }
+ else
+ m_pdata->m_has_recursions = false;
    // create nested startmaps:
    create_startmaps(m_pdata->m_first_state);
    // create main startmap:
@@ -713,6 +722,13 @@
    {
       switch(state->type)
       {
+ case syntax_element_recurse:
+ m_has_recursions = true;
+ if(state->next.i)
+ state->next.p = getaddress(state->next.i, state);
+ else
+ state->next.p = 0;
+ break;
       case syntax_element_rep:
       case syntax_element_dot_rep:
       case syntax_element_char_rep:
@@ -739,6 +755,93 @@
 }
 
 template <class charT, class traits>
+void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
+{
+ re_syntax_base* base = state;
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_assert_backref:
+ {
+ // just check that the index is valid:
+ int id = static_cast<const re_brace*>(state)->index;
+ if(id < 0)
+ {
+ id = -id-1;
+ if(id >= 10000)
+ {
+ id = m_pdata->get_id(id);
+ if(id <= 0)
+ {
+ // check of sub-expression that doesn't exist:
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern);
+ boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
+ e.raise();
+ }
+ }
+ }
+ }
+ }
+ break;
+ case syntax_element_recurse:
+ {
+ bool ok = false;
+ re_syntax_base* p = base;
+ int id = static_cast<re_jump*>(state)->alt.i;
+ if(id > 10000)
+ id = m_pdata->get_id(id);
+ while(p)
+ {
+ if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == id))
+ {
+ static_cast<re_jump*>(state)->alt.p = p;
+ ok = true;
+ break;
+ }
+ p = p->next.p;
+ }
+ if(!ok)
+ {
+ // recursion to sub-expression that doesn't exist:
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern);
+ boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
+ e.raise();
+ }
+ }
+ }
+ default:
+ break;
+ }
+ state = state->next.p;
+ }
+}
+
+template <class charT, class traits>
 void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
 {
    // non-recursive implementation:
@@ -953,6 +1056,7 @@
             create_startmap(state->next.p, 0, pnull, mask);
          return;
       }
+ case syntax_element_recurse:
       case syntax_element_backref:
          // can be null, and any character can match:
          if(pnull)

Modified: branches/release/boost/regex/v4/basic_regex_parser.hpp
==============================================================================
--- branches/release/boost/regex/v4/basic_regex_parser.hpp (original)
+++ branches/release/boost/regex/v4/basic_regex_parser.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -78,6 +78,8 @@
    const charT* m_end; // the end of the string being parsed
    const charT* m_position; // our current parser position
    unsigned m_mark_count; // how many sub-expressions we have
+ int m_mark_reset; // used to indicate that we're inside a (?|...) block.
+ unsigned m_max_mark; // largest mark count seen inside a (?|...) block.
    std::ptrdiff_t m_paren_start; // where the last seen ')' began (where repeats are inserted).
    std::ptrdiff_t m_alt_insert_point; // where to insert the next alternative
    bool m_has_case_change; // true if somewhere in the current block the case has changed
@@ -96,7 +98,7 @@
 
 template <class charT, class traits>
 basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
- : basic_regex_creator<charT, traits>(data), m_mark_count(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false)
+ : basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false)
 {
 }
 
@@ -123,8 +125,16 @@
    switch(l_flags & regbase::main_option_type)
    {
    case regbase::perl_syntax_group:
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
- break;
+ {
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
+ //
+ // Add a leading paren with index zero to give recursions a target:
+ //
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ br->index = 0;
+ br->icase = this->flags() & regbase::icase;
+ break;
+ }
    case regbase::basic_syntax_group:
       m_parser_proc = &basic_regex_parser<charT, traits>::parse_basic;
       break;
@@ -375,11 +385,17 @@
    if(0 == (this->flags() & regbase::nosubs))
    {
       markid = ++m_mark_count;
+#ifndef BOOST_NO_STD_DISTANCE
       if(this->flags() & regbase::save_subexpression_location)
          this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 1, 0));
+#else
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 1, 0));
+#endif
    }
    re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
    pb->index = markid;
+ pb->icase = this->flags() & regbase::icase;
    std::ptrdiff_t last_paren_start = this->getoffset(pb);
    // back up insertion point for alternations, and set new point:
    std::ptrdiff_t last_alt_point = m_alt_insert_point;
@@ -392,6 +408,11 @@
    bool old_case_change = m_has_case_change;
    m_has_case_change = false; // no changes to this scope as yet...
    //
+ // Back up branch reset data in case we have a nested (?|...)
+ //
+ int mark_reset = m_mark_reset;
+ m_mark_reset = -1;
+ //
    // now recursively add more states, this will terminate when we get to a
    // matching ')' :
    //
@@ -416,6 +437,10 @@
    this->flags(opts);
    m_has_case_change = old_case_change;
    //
+ // restore branch reset:
+ //
+ m_mark_reset = mark_reset;
+ //
    // we either have a ')' or we have run out of characters prematurely:
    //
    if(m_position == m_end)
@@ -424,14 +449,20 @@
       return false;
    }
    BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
+#ifndef BOOST_NO_STD_DISTANCE
    if(markid && (this->flags() & regbase::save_subexpression_location))
       this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
+#else
+ if(markid && (this->flags() & regbase::save_subexpression_location))
+ this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base);
+#endif
    ++m_position;
    //
    // append closing parenthesis state:
    //
    pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
    pb->index = markid;
+ pb->icase = this->flags() & regbase::icase;
    this->m_paren_start = last_paren_start;
    //
    // restore the alternate insertion point:
@@ -600,6 +631,7 @@
       // fall through:
    case regex_constants::escape_type_class:
       {
+escape_type_class_jump:
          typedef typename traits::char_class_type mask_type;
          mask_type m = this->m_traits.lookup_classname(m_position, m_position+1);
          if(m != 0)
@@ -709,7 +741,104 @@
             return true;
          }
          fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ case regex_constants::escape_type_reset_start_mark:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ {
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ pb->index = -5;
+ pb->icase = this->flags() & regbase::icase;
+ this->m_pdata->m_data.align();
+ ++m_position;
+ return true;
       }
+ goto escape_type_class_jump;
+ case regex_constants::escape_type_line_ending:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ {
+ const charT* e = get_escape_R_string<charT>();
+ const charT* old_position = m_position;
+ const charT* old_end = m_end;
+ const charT* old_base = m_base;
+ m_position = e;
+ m_base = e;
+ m_end = e + traits::length(e);
+ bool r = parse_all();
+ m_position = ++old_position;
+ m_end = old_end;
+ m_base = old_base;
+ return r;
+ }
+ goto escape_type_class_jump;
+ case regex_constants::escape_type_extended_backref:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ {
+ bool have_brace = false;
+ bool negative = false;
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ // maybe have \g{ddd}
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
+ {
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ have_brace = true;
+ }
+ negative = (*m_position == static_cast<charT>('-'));
+ if((negative) && (++m_position == m_end))
+ {
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ const charT* pc = m_position;
+ int i = this->m_traits.toi(pc, m_end, 10);
+ if(i < 0)
+ {
+ // Check for a named capture:
+ const charT* base = m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
+ ++m_position;
+ i = this->m_pdata->get_id(base, m_position);
+ pc = m_position;
+ }
+ if(negative)
+ i = 1 + m_mark_count - i;
+ if((i > 0) && (this->m_backrefs & (1u << (i-1))))
+ {
+ m_position = pc;
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
+ pb->index = i;
+ pb->icase = this->flags() & regbase::icase;
+ }
+ else
+ {
+ fail(regex_constants::error_backref, m_position - m_end);
+ return false;
+ }
+ m_position = pc;
+ if(have_brace)
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
+ {
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ }
+ return true;
+ }
+ goto escape_type_class_jump;
+ case regex_constants::escape_type_control_v:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ goto escape_type_class_jump;
+ // fallthrough:
    default:
       this->append_literal(unescape_character());
       break;
@@ -737,6 +866,7 @@
 bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_t high)
 {
    bool greedy = true;
+ bool pocessive = false;
    std::size_t insert_point;
    //
    // when we get to here we may have a non-greedy ? mark still to come:
@@ -748,12 +878,19 @@
          )
       )
    {
- // OK we have a perl regex, check for a '?':
+ // OK we have a perl or emacs regex, check for a '?':
       if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question)
       {
          greedy = false;
          ++m_position;
       }
+ // for perl regexes only check for pocessive ++ repeats.
+ if((0 == (this->flags() & regbase::main_option_type))
+ && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
+ {
+ pocessive = true;
+ ++m_position;
+ }
    }
    if(0 == this->m_last_state)
    {
@@ -822,6 +959,22 @@
    // now fill in the alt jump for the repeat:
    rep = static_cast<re_repeat*>(this->getaddress(rep_off));
    rep->alt.i = this->m_pdata->m_data.size() - rep_off;
+ //
+ // If the repeat is pocessive then bracket the repeat with a (?>...)
+ // independent sub-expression construct:
+ //
+ if(pocessive)
+ {
+ re_brace* pb = static_cast<re_brace*>(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace)));
+ pb->index = -3;
+ pb->icase = this->flags() & regbase::icase;
+ re_jump* jmp = static_cast<re_jump*>(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump)));
+ this->m_pdata->m_data.align();
+ jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
+ pb->index = -3;
+ pb->icase = this->flags() & regbase::icase;
+ }
    return true;
 }
 
@@ -944,6 +1097,14 @@
       fail(regex_constants::error_empty, this->m_position - this->m_base);
       return false;
    }
+ //
+ // Reset mark count if required:
+ //
+ if(m_max_mark < m_mark_count)
+ m_max_mark = m_mark_count;
+ if(m_mark_reset >= 0)
+ m_mark_count = m_mark_reset;
+
    ++m_position;
    //
    // we need to append a trailing jump:
@@ -1462,7 +1623,7 @@
          int i = this->m_traits.toi(m_position, m_end, 16);
          if((m_position == m_end)
             || (i < 0)
- || ((std::numeric_limits<charT>::is_specialized) && (charT(i) > (std::numeric_limits<charT>::max)()))
+ || ((std::numeric_limits<charT>::is_specialized) && (i > (int)(std::numeric_limits<charT>::max)()))
             || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
          {
             fail(regex_constants::error_badbrace, m_position - m_base);
@@ -1568,6 +1729,7 @@
       m_position = pc;
       re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
       pb->index = i;
+ pb->icase = this->flags() & regbase::icase;
    }
    else
    {
@@ -1655,6 +1817,7 @@
    int markid = 0;
    std::ptrdiff_t jump_offset = 0;
    re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ pb->icase = this->flags() & regbase::icase;
    std::ptrdiff_t last_paren_start = this->getoffset(pb);
    // back up insertion point for alternations, and set new point:
    std::ptrdiff_t last_alt_point = m_alt_insert_point;
@@ -1665,11 +1828,18 @@
    regex_constants::syntax_option_type old_flags = this->flags();
    bool old_case_change = m_has_case_change;
    m_has_case_change = false;
+ charT name_delim;
+ int mark_reset = m_mark_reset;
+ m_mark_reset = -1;
+ int v;
    //
    // select the actual extension used:
    //
    switch(this->m_traits.syntax_type(*m_position))
    {
+ case regex_constants::syntax_or:
+ m_mark_reset = m_mark_count;
+ // fall through:
    case regex_constants::syntax_colon:
       //
       // a non-capturing mark:
@@ -1677,6 +1847,57 @@
       pb->index = markid = 0;
       ++m_position;
       break;
+ case regex_constants::syntax_digit:
+ {
+ //
+ // a recursive subexpression:
+ //
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+insert_recursion:
+ pb->index = markid = 0;
+ static_cast<re_jump*>(this->append_state(syntax_element_recurse, sizeof(re_jump)))->alt.i = v;
+ static_cast<re_case*>(
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
+ )->icase = this->flags() & regbase::icase;
+ break;
+ }
+ case regex_constants::syntax_plus:
+ //
+ // A forward-relative recursive subexpression:
+ //
+ ++m_position;
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ v += m_mark_count;
+ goto insert_recursion;
+ case regex_constants::syntax_dash:
+ //
+ // Possibly a backward-relative recursive subexpression:
+ //
+ ++m_position;
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if(v <= 0)
+ {
+ --m_position;
+ // Oops not a relative recursion at all, but a (?-imsx) group:
+ goto option_group_jump;
+ }
+ v = m_mark_count + 1 - v;
+ if(v <= 0)
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ goto insert_recursion;
    case regex_constants::syntax_equal:
       pb->index = markid = -1;
       ++m_position;
@@ -1706,8 +1927,10 @@
             pb->index = markid = -1;
          else
          {
- fail(regex_constants::error_badrepeat, m_position - m_base);
- return false;
+ // Probably a named capture which also starts (?< :
+ name_delim = '>';
+ --m_position;
+ goto named_capture_jump;
          }
          ++m_position;
          jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
@@ -1736,7 +1959,95 @@
          return false;
       }
       int v = this->m_traits.toi(m_position, m_end, 10);
- if(v > 0)
+ if(*m_position == charT('R'))
+ {
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ if(*m_position == charT('&'))
+ {
+ const charT* base = ++m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ v = -static_cast<int>(hash_value_from_capture_name(base, m_position));
+ }
+ else
+ {
+ v = -this->m_traits.toi(m_position, m_end, 10);
+ }
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = v < 0 ? (v - 1) : 0;
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ }
+ else if((*m_position == charT('\'')) || (*m_position == charT('<')))
+ {
+ const charT* base = ++m_position;
+ while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\'')))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = v;
+ if((*m_position != charT('>')) && (*m_position != charT('\'')) || (++m_position == m_end))
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ }
+ else if(*m_position == charT('D'))
+ {
+ const char* def = "DEFINE";
+ while(*def && (m_position != m_end) && (*m_position == charT(*def)))
+ ++m_position, ++def;
+ if((m_position == m_end) || *def)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = 9999; // special magic value!
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ }
+ }
+ else if(v > 0)
       {
          re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
          br->index = v;
@@ -1784,7 +2095,7 @@
             if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
                && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
             {
- fail(regex_constants::error_badrepeat, m_position - m_base);
+ fail(regex_constants::error_paren, m_position - m_base);
                return false;
             }
             m_position -= 2;
@@ -1795,10 +2106,93 @@
    case regex_constants::syntax_close_mark:
       fail(regex_constants::error_badrepeat, m_position - m_base);
       return false;
+ case regex_constants::escape_type_end_buffer:
+ {
+ name_delim = *m_position;
+named_capture_jump:
+ markid = 0;
+ if(0 == (this->flags() & regbase::nosubs))
+ {
+ markid = ++m_mark_count;
+ #ifndef BOOST_NO_STD_DISTANCE
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 2, 0));
+ #else
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 2, 0));
+ #endif
+ }
+ pb->index = markid;
+ const charT* base = ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ while((m_position != m_end) && (*m_position != name_delim))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ this->m_pdata->set_name(base, m_position, markid);
+ ++m_position;
+ break;
+ }
    default:
+ if(*m_position == charT('R'))
+ {
+ ++m_position;
+ v = 0;
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ goto insert_recursion;
+ }
+ if(*m_position == charT('&'))
+ {
+ ++m_position;
+ const charT* base = m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
+ goto insert_recursion;
+ }
+ if(*m_position == charT('P'))
+ {
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ if(*m_position == charT('>'))
+ {
+ ++m_position;
+ const charT* base = m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
+ goto insert_recursion;
+ }
+ }
       //
       // lets assume that we have a (?imsx) group and try and parse it:
       //
+option_group_jump:
       regex_constants::syntax_option_type opts = parse_options();
       if(m_position == m_end)
          return false;
@@ -1897,9 +2291,20 @@
       }
       else if(this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
       {
+ // Can't have seen more than one alternative:
          fail(regex_constants::error_bad_pattern, m_position - m_base);
          return false;
       }
+ else
+ {
+ // We must *not* have seen an alternative inside a (DEFINE) block:
+ b = this->getaddress(b->next.i, b);
+ if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999))
+ {
+ fail(regex_constants::error_bad_pattern, m_position - m_base);
+ return false;
+ }
+ }
       // check for invalid repetition of next state:
       b = this->getaddress(expected_alt_point);
       b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
@@ -1915,6 +2320,7 @@
    //
    pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
    pb->index = markid;
+ pb->icase = this->flags() & regbase::icase;
    this->m_paren_start = last_paren_start;
    //
    // restore the alternate insertion point:
@@ -1924,6 +2330,31 @@
    // and the case change data:
    //
    m_has_case_change = old_case_change;
+ //
+ // And the mark_reset data:
+ //
+ if(m_max_mark > m_mark_count)
+ {
+ m_mark_count = m_max_mark;
+ }
+ m_mark_reset = mark_reset;
+
+
+ if(markid > 0)
+ {
+#ifndef BOOST_NO_STD_DISTANCE
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1;
+#else
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base) - 1;
+#endif
+ //
+ // allow backrefs to this mark:
+ //
+ if((markid > 0) && (markid < (int)(sizeof(unsigned) * CHAR_BIT)))
+ this->m_backrefs |= 1u << (markid - 1);
+ }
    return true;
 }
 

Modified: branches/release/boost/regex/v4/cpp_regex_traits.hpp
==============================================================================
--- branches/release/boost/regex/v4/cpp_regex_traits.hpp (original)
+++ branches/release/boost/regex/v4/cpp_regex_traits.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -394,7 +394,9 @@
    char_class_graph=char_class_alnum|char_class_punct,
    char_class_blank=1<<9,
    char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal_space=1<<12,
+ char_class_vertical_space=1<<13
 };
 
 #endif
@@ -413,6 +415,8 @@
    BOOST_STATIC_CONSTANT(char_class_type, mask_blank = 1u << 24);
    BOOST_STATIC_CONSTANT(char_class_type, mask_word = 1u << 25);
    BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 1u << 26);
+ BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 1u << 27);
+ BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 1u << 28);
 #endif
 
    typedef std::basic_string<charT> string_type;
@@ -477,6 +481,10 @@
 typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_word;
 template <class charT>
 typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_unicode;
+template <class charT>
+typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_vertical;
+template <class charT>
+typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex_traits_implementation<charT>::mask_horizontal;
 
 #endif
 #endif
@@ -688,18 +696,20 @@
       // Custom class names:
       //
 #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
- static const char_class_type masks[14] =
+ static const char_class_type masks[16] =
       {
          std::ctype<charT>::alnum,
          std::ctype<charT>::alpha,
          std::ctype<charT>::cntrl,
          std::ctype<charT>::digit,
          std::ctype<charT>::graph,
+ cpp_regex_traits_implementation<charT>::mask_horizontal,
          std::ctype<charT>::lower,
          std::ctype<charT>::print,
          std::ctype<charT>::punct,
          std::ctype<charT>::space,
          std::ctype<charT>::upper,
+ cpp_regex_traits_implementation<charT>::mask_vertical,
          std::ctype<charT>::xdigit,
          cpp_regex_traits_implementation<charT>::mask_blank,
          cpp_regex_traits_implementation<charT>::mask_word,
@@ -713,11 +723,13 @@
          ::boost::re_detail::char_class_cntrl,
          ::boost::re_detail::char_class_digit,
          ::boost::re_detail::char_class_graph,
+ ::boost::re_detail::char_class_horizontal_space,
          ::boost::re_detail::char_class_lower,
          ::boost::re_detail::char_class_print,
          ::boost::re_detail::char_class_punct,
          ::boost::re_detail::char_class_space,
          ::boost::re_detail::char_class_upper,
+ ::boost::re_detail::char_class_vertical_space,
          ::boost::re_detail::char_class_xdigit,
          ::boost::re_detail::char_class_blank,
          ::boost::re_detail::char_class_word,
@@ -744,7 +756,7 @@
    cpp_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
 {
 #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
- static const char_class_type masks[20] =
+ static const char_class_type masks[22] =
    {
       0,
       std::ctype<char>::alnum,
@@ -754,6 +766,7 @@
       std::ctype<char>::digit,
       std::ctype<char>::digit,
       std::ctype<char>::graph,
+ cpp_regex_traits_implementation<charT>::mask_horizontal,
       std::ctype<char>::lower,
       std::ctype<char>::lower,
       std::ctype<char>::print,
@@ -763,12 +776,13 @@
       std::ctype<char>::upper,
       cpp_regex_traits_implementation<charT>::mask_unicode,
       std::ctype<char>::upper,
+ cpp_regex_traits_implementation<charT>::mask_vertical,
       std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
       std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
       std::ctype<char>::xdigit,
    };
 #else
- static const char_class_type masks[20] =
+ static const char_class_type masks[22] =
    {
       0,
       ::boost::re_detail::char_class_alnum,
@@ -778,6 +792,7 @@
       ::boost::re_detail::char_class_digit,
       ::boost::re_detail::char_class_digit,
       ::boost::re_detail::char_class_graph,
+ ::boost::re_detail::char_class_horizontal_space,
       ::boost::re_detail::char_class_lower,
       ::boost::re_detail::char_class_lower,
       ::boost::re_detail::char_class_print,
@@ -787,6 +802,7 @@
       ::boost::re_detail::char_class_upper,
       ::boost::re_detail::char_class_unicode,
       ::boost::re_detail::char_class_upper,
+ ::boost::re_detail::char_class_vertical_space,
       ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
       ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
       ::boost::re_detail::char_class_xdigit,
@@ -820,7 +836,9 @@
       || ((mask & ::boost::re_detail::char_class_xdigit) && (m_pctype->is(std::ctype<charT>::xdigit, c)))
       || ((mask & ::boost::re_detail::char_class_blank) && (m_pctype->is(std::ctype<charT>::space, c)) && !::boost::re_detail::is_separator(c))
       || ((mask & ::boost::re_detail::char_class_word) && (c == '_'))
- || ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c));
+ || ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c))
+ || ((mask & ::boost::re_detail::char_class_vertical) && (is_separator(c) || (c == '\v')))
+ || ((mask & ::boost::re_detail::char_class_horizontal) && m_pctype->is(std::ctype<charT>::space, c) && !(is_separator(c) || (c == '\v')));
 }
 #endif
 
@@ -930,6 +948,12 @@
          && m_pimpl->m_pctype->is(std::ctype<charT>::space, c)
          && !re_detail::is_separator(c))
          return true;
+ else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_vertical)
+ && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ return true;
+ else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_horizontal)
+ && this->isctype(c, std::ctype<charT>::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation<charT>::mask_vertical))
+ return true;
       return false;
 #else
       return m_pimpl->isctype(c, f);

Modified: branches/release/boost/regex/v4/iterator_category.hpp
==============================================================================
--- branches/release/boost/regex/v4/iterator_category.hpp (original)
+++ branches/release/boost/regex/v4/iterator_category.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -31,10 +31,14 @@
 template <class I>
 struct is_random_imp
 {
+#ifndef BOOST_NO_STD_ITERATOR_TRAITS
 private:
    typedef typename std::iterator_traits<I>::iterator_category cat;
 public:
    BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
+#else
+ BOOST_STATIC_CONSTANT(bool, value = false);
+#endif
 };
 
 template <class I>

Modified: branches/release/boost/regex/v4/match_results.hpp
==============================================================================
--- branches/release/boost/regex/v4/match_results.hpp (original)
+++ branches/release/boost/regex/v4/match_results.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -36,6 +36,13 @@
 #pragma warning(disable : 4251 4231 4660)
 #endif
 
+namespace re_detail{
+
+template <class charT>
+class named_subexpressions;
+
+}
+
 template <class BidiIterator, class Allocator>
 class match_results
 {
@@ -62,13 +69,14 @@
    typedef typename re_detail::regex_iterator_traits<
                                     BidiIterator>::value_type char_type;
    typedef std::basic_string<char_type> string_type;
+ typedef re_detail::named_subexpressions_base<char_type> named_sub_type;
 
    // construct/copy/destroy:
    explicit match_results(const Allocator& a = Allocator())
 #ifndef BOOST_NO_STD_ALLOCATOR
- : m_subs(a), m_base() {}
+ : m_subs(a), m_base(), m_last_closed_paren(0) {}
 #else
- : m_subs(), m_base() { (void)a; }
+ : m_subs(), m_base(), m_last_closed_paren(0) { (void)a; }
 #endif
    match_results(const match_results& m)
       : m_subs(m.m_subs), m_base(m.m_base) {}
@@ -95,6 +103,24 @@
          return m_subs[sub].length();
       return 0;
    }
+ difference_type length(const char_type* sub) const
+ {
+ const char_type* end = sub;
+ while(*end) ++end;
+ return length(named_subexpression_index(sub, end));
+ }
+ template <class charT>
+ difference_type length(const charT* sub) const
+ {
+ const charT* end = sub;
+ while(*end) ++end;
+ return length(named_subexpression_index(sub, end));
+ }
+ template <class charT, class Traits, class A>
+ difference_type length(const std::basic_string<charT, Traits, A>& sub) const
+ {
+ return length(sub.c_str());
+ }
    difference_type position(size_type sub = 0) const
    {
       sub += 2;
@@ -108,6 +134,24 @@
       }
       return ~static_cast<difference_type>(0);
    }
+ difference_type position(const char_type* sub) const
+ {
+ const char_type* end = sub;
+ while(*end) ++end;
+ return position(named_subexpression_index(sub, end));
+ }
+ template <class charT>
+ difference_type position(const charT* sub) const
+ {
+ const charT* end = sub;
+ while(*end) ++end;
+ return position(named_subexpression_index(sub, end));
+ }
+ template <class charT, class Traits, class A>
+ difference_type position(const std::basic_string<charT, Traits, A>& sub) const
+ {
+ return position(sub.c_str());
+ }
    string_type str(int sub = 0) const
    {
       sub += 2;
@@ -122,6 +166,25 @@
       }
       return result;
    }
+ string_type str(const char_type* sub) const
+ {
+ return (*this)[sub].str();
+ }
+ template <class Traits, class A>
+ string_type str(const std::basic_string<char_type, Traits, A>& sub) const
+ {
+ return (*this)[sub].str();
+ }
+ template <class charT>
+ string_type str(const charT* sub) const
+ {
+ return (*this)[sub].str();
+ }
+ template <class charT, class Traits, class A>
+ string_type str(const std::basic_string<charT, Traits, A>& sub) const
+ {
+ return (*this)[sub].str();
+ }
    const_reference operator[](int sub) const
    {
       sub += 2;
@@ -131,6 +194,75 @@
       }
       return m_null;
    }
+ //
+ // Named sub-expressions:
+ //
+ const_reference named_subexpression(const char_type* i, const char_type* j) const
+ {
+ int index = m_named_subs->get_id(i, j);
+ return index > 0 ? (*this)[index] : m_null;
+ }
+ template <class charT>
+ const_reference named_subexpression(const charT* i, const charT* j) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(i == j)
+ return m_null;
+ std::vector<char_type> s;
+ while(i != j)
+ s.insert(s.end(), *i++);
+ return named_subexpression(&*s.begin(), &*s.begin() + s.size());
+ }
+ int named_subexpression_index(const char_type* i, const char_type* j) const
+ {
+ int index = m_named_subs->get_id(i, j);
+ return index > 0 ? index : -20;
+ }
+ template <class charT>
+ int named_subexpression_index(const charT* i, const charT* j) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(i == j)
+ return -20;
+ std::vector<char_type> s;
+ while(i != j)
+ s.insert(s.end(), *i++);
+ return named_subexpression_index(&*s.begin(), &*s.begin() + s.size());
+ }
+ template <class Traits, class A>
+ const_reference operator[](const std::basic_string<char_type, Traits, A>& s) const
+ {
+ return named_subexpression(s.c_str(), s.c_str() + s.size());
+ }
+ const_reference operator[](const char_type* p) const
+ {
+ const char_type* e = p;
+ while(*e) ++e;
+ return named_subexpression(p, e);
+ }
+
+ template <class charT>
+ const_reference operator[](const charT* p) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(*p == 0)
+ return m_null;
+ std::vector<char_type> s;
+ while(*p)
+ s.insert(s.end(), *p++);
+ return named_subexpression(&*s.begin(), &*s.begin() + s.size());
+ }
+ template <class charT, class Traits, class A>
+ const_reference operator[](const std::basic_string<charT, Traits, A>& ns) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(ns.empty())
+ return m_null;
+ std::vector<char_type> s;
+ for(unsigned i = 0; i < ns.size(); ++i)
+ s.insert(s.end(), ns[i]);
+ return named_subexpression(&*s.begin(), &*s.begin() + s.size());
+ }
 
    const_reference prefix() const
    {
@@ -186,6 +318,10 @@
       ::boost::re_detail::regex_format_imp(i, *this, fmt.data(), fmt.data() + fmt.size(), flags, re.get_traits());
       return result;
    }
+ const_reference get_last_closed_paren()const
+ {
+ return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren];
+ }
 
    allocator_type get_allocator() const
    {
@@ -230,13 +366,15 @@
       m_null.matched = false;
    }
 
- void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true)
+ void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
    {
+ if(pos)
+ m_last_closed_paren = pos;
       pos += 2;
       BOOST_ASSERT(m_subs.size() > pos);
       m_subs[pos].second = i;
       m_subs[pos].matched = m;
- if(pos == 2)
+ if((pos == 2) && !escape_k)
       {
          m_subs[0].first = i;
          m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
@@ -261,6 +399,7 @@
             m_subs.insert(m_subs.end(), n+2-len, v);
       }
       m_subs[1].first = i;
+ m_last_closed_paren = 0;
    }
    void BOOST_REGEX_CALL set_base(BidiIterator pos)
    {
@@ -284,21 +423,34 @@
          m_subs[n].matched = false;
       }
    }
- void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos)
+ void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos, bool escape_k = false)
    {
       BOOST_ASSERT(pos+2 < m_subs.size());
- if(pos)
+ if(pos || escape_k)
+ {
          m_subs[pos+2].first = i;
+ if(escape_k)
+ {
+ m_subs[1].second = i;
+ m_subs[1].matched = (m_subs[1].first != m_subs[1].second);
+ }
+ }
       else
          set_first(i);
    }
    void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
 
+ void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr<named_sub_type> subs)
+ {
+ m_named_subs = subs;
+ }
 
 private:
    vector_type m_subs; // subexpressions
    BidiIterator m_base; // where the search started from
    sub_match<BidiIterator> m_null; // a null match
+ boost::shared_ptr<named_sub_type> m_named_subs;
+ int m_last_closed_paren;
 };
 
 template <class BidiIterator, class Allocator>

Modified: branches/release/boost/regex/v4/perl_matcher.hpp
==============================================================================
--- branches/release/boost/regex/v4/perl_matcher.hpp (original)
+++ branches/release/boost/regex/v4/perl_matcher.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -285,7 +285,8 @@
    }
    ~repeater_count()
    {
- *stack = next;
+ if(next)
+ *stack = next;
    }
    std::size_t get_count() { return count; }
    int get_id() { return state_id; }
@@ -325,6 +326,17 @@
    saved_state_count = 14
 };
 
+template <class Results>
+struct recursion_info
+{
+ typedef typename Results::value_type value_type;
+ typedef typename value_type::iterator iterator;
+ int id;
+ const re_syntax_base* preturn_address;
+ Results results;
+ repeater_count<iterator>* repeater_stack;
+};
+
 #ifdef BOOST_MSVC
 #pragma warning(push)
 #pragma warning(disable : 4251 4231 4660)
@@ -340,6 +352,7 @@
    typedef std::size_t traits_size_type;
    typedef typename is_byte<char_type>::width_type width_type;
    typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
+ typedef match_results<BidiIterator, Allocator> results_type;
 
    perl_matcher(BidiIterator first, BidiIterator end,
       match_results<BidiIterator, Allocator>& what,
@@ -348,7 +361,7 @@
       BidiIterator l_base)
       : m_result(what), base(first), last(end),
          position(first), backstop(l_base), re(e), traits_inst(e.get_traits()),
- m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
+ m_independent(false), next_count(&rep_obj), rep_obj(&next_count), recursion_stack_position(0)
    {
       construct_init(e, f);
    }
@@ -403,12 +416,17 @@
    bool match_char_repeat();
    bool match_dot_repeat_fast();
    bool match_dot_repeat_slow();
+ bool match_dot_repeat_dispatch()
+ {
+ return ::boost::is_random_access_iterator<BidiIterator>::value ? match_dot_repeat_fast() : match_dot_repeat_slow();
+ }
    bool match_backstep();
    bool match_assert_backref();
    bool match_toggle_case();
 #ifdef BOOST_REGEX_RECURSIVE
    bool backtrack_till_match(std::size_t count);
 #endif
+ bool match_recursion();
 
    // find procs stored in s_find_vtable:
    bool find_restart_any();
@@ -464,6 +482,9 @@
    typename traits::char_class_type m_word_mask;
    // the bitmask to use when determining whether a match_any matches a newline or not:
    unsigned char match_any_mask;
+ // recursion information:
+ recursion_info<results_type> recursion_stack[50];
+ unsigned recursion_stack_position;
 
 #ifdef BOOST_REGEX_NON_RECURSIVE
    //
@@ -487,6 +508,8 @@
    bool unwind_short_set_repeat(bool);
    bool unwind_long_set_repeat(bool);
    bool unwind_non_greedy_repeat(bool);
+ bool unwind_recursion(bool);
+ bool unwind_recursion_pop(bool);
    void destroy_single_repeat();
    void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
    void push_recursion_stopper();
@@ -495,7 +518,8 @@
    void push_repeater_count(int i, repeater_count<BidiIterator>** s);
    void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id);
    void push_non_greedy_repeat(const re_syntax_base* ps);
-
+ void push_recursion(int id, const re_syntax_base* p, results_type* presults);
+ void push_recursion_pop();
 
    // pointer to base of stack:
    saved_state* m_stack_base;

Modified: branches/release/boost/regex/v4/perl_matcher_common.hpp
==============================================================================
--- branches/release/boost/regex/v4/perl_matcher_common.hpp (original)
+++ branches/release/boost/regex/v4/perl_matcher_common.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -200,12 +200,13 @@
    m_match_flags |= regex_constants::match_all;
    m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last);
    m_presult->set_base(base);
+ m_presult->set_named_subs(re_detail::convert_to_named_subs<typename match_results<BidiIterator>::char_type>(this->re.get_named_subs()));
    if(m_match_flags & match_posix)
       m_result = *m_presult;
    verify_options(re.flags(), m_match_flags);
    if(0 == match_prefix())
       return false;
- return m_result[0].second == last;
+ return (m_result[0].second == last) && (m_result[0].first == base);
 
 #if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
    }
@@ -261,6 +262,7 @@
       pstate = re.get_first_state();
       m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
       m_presult->set_base(base);
+ m_presult->set_named_subs(re_detail::convert_to_named_subs<typename match_results<BidiIterator>::char_type>(this->re.get_named_subs()));
       m_match_flags |= regex_constants::match_init;
    }
    else
@@ -344,25 +346,6 @@
 }
 
 template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
-{
- int index = static_cast<const re_brace*>(pstate)->index;
- if(index > 0)
- {
- if((m_match_flags & match_nosubs) == 0)
- m_presult->set_second(position, index);
- }
- else if((index < 0) && (index != -4))
- {
- // matched forward lookahead:
- pstate = 0;
- return true;
- }
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_literal()
 {
    unsigned int len = static_cast<const re_literal*>(pstate)->length;
@@ -463,35 +446,6 @@
 }
 
 template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
-{
- if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
- return false;
- if((m_match_flags & match_all) && (position != last))
- return false;
- if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
- return false;
- m_presult->set_second(position);
- pstate = 0;
- m_has_found_match = true;
- if((m_match_flags & match_posix) == match_posix)
- {
- m_result.maybe_assign(*m_presult);
- if((m_match_flags & match_any) == 0)
- return false;
- }
-#ifdef BOOST_REGEX_MATCH_EXTRA
- if(match_extra & m_match_flags)
- {
- for(unsigned i = 0; i < m_presult->size(); ++i)
- if((*m_presult)[i].matched)
- ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
- }
-#endif
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
 {
    bool b; // indcates whether next character is a word character
@@ -758,8 +712,32 @@
 inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref()
 {
    // return true if marked sub-expression N has been matched:
- bool result = (*m_presult)[static_cast<const re_brace*>(pstate)->index].matched;
- pstate = pstate->next.p;
+ int index = static_cast<const re_brace*>(pstate)->index;
+ bool result;
+ if(index == 9999)
+ {
+ // Magic value for a (DEFINE) block:
+ return false;
+ }
+ else if(index > 0)
+ {
+ // Check if index is a hash value:
+ if(index >= 10000)
+ index = re.get_data().get_id(index);
+ // Have we matched subexpression "index"?
+ result = (*m_presult)[index].matched;
+ pstate = pstate->next.p;
+ }
+ else
+ {
+ // Have we recursed into subexpression "index"?
+ // If index == 0 then check for any recursion at all, otherwise for recursion to -index-1.
+ int id = -index-1;
+ if(id >= 10000)
+ id = re.get_data().get_id(id);
+ result = recursion_stack_position && ((recursion_stack[recursion_stack_position-1].id == id) || (index == 0));
+ pstate = pstate->next.p;
+ }
    return result;
 }
 

Modified: branches/release/boost/regex/v4/perl_matcher_non_recursive.hpp
==============================================================================
--- branches/release/boost/regex/v4/perl_matcher_non_recursive.hpp (original)
+++ branches/release/boost/regex/v4/perl_matcher_non_recursive.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -127,10 +127,21 @@
       : saved_state(arg_id), count(c), rep(r), last_position(lp){}
 };
 
+template <class Results>
+struct saved_recursion : public saved_state
+{
+ saved_recursion(int id, const re_syntax_base* p, Results* pr)
+ : saved_state(14), recursion_id(id), preturn_address(p), results(*pr)
+ {}
+ int recursion_id;
+ const re_syntax_base* preturn_address;
+ Results results;
+};
+
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
 {
- static matcher_proc_type const s_match_vtable[29] =
+ static matcher_proc_type const s_match_vtable[30] =
    {
       (&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
       &perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
@@ -154,13 +165,18 @@
       &perl_matcher<BidiIterator, Allocator, traits>::match_combining,
       &perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
       &perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
- (::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
+ // Although this next line *should* be evaluated at compile time, in practice
+ // some compilers (VC++) emit run-time initialisation which breaks thread
+ // safety, so use a dispatch function instead:
+ //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
+ &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
       &perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
       &perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
       &perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
    };
 
    push_recursion_stopper();
@@ -209,7 +225,7 @@
 template <class BidiIterator, class Allocator, class traits>
 inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(int index, const sub_match<BidiIterator>& sub)
 {
- BOOST_ASSERT(index);
+ //BOOST_ASSERT(index);
    saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
    --pmp;
    if(pmp < m_stack_base)
@@ -313,9 +329,25 @@
 }
 
 template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int id, const re_syntax_base* p, results_type* presults)
+{
+ saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_recursion<results_type>(id, p, presults);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
 {
    int index = static_cast<const re_brace*>(pstate)->index;
+ icase = static_cast<const re_brace*>(pstate)->icase;
    switch(index)
    {
    case 0:
@@ -400,6 +432,13 @@
          break;
       }
       }
+ case -5:
+ {
+ push_matched_paren(0, (*m_presult)[0]);
+ m_presult->set_first(position, 0, true);
+ pstate = pstate->next.p;
+ break;
+ }
    default:
    {
       BOOST_ASSERT(index > 0);
@@ -848,6 +887,100 @@
 #endif
 }
 
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
+{
+ BOOST_ASSERT(pstate->type == syntax_element_recurse);
+ //
+ // Backup call stack:
+ //
+ push_recursion_pop();
+ //
+ // Set new call stack:
+ //
+ if(recursion_stack_position >= static_cast<int>(sizeof(recursion_stack)/sizeof(recursion_stack[0])))
+ {
+ return false;
+ }
+ recursion_stack[recursion_stack_position].preturn_address = pstate->next.p;
+ recursion_stack[recursion_stack_position].results = *m_presult;
+ pstate = static_cast<const re_jump*>(pstate)->alt.p;
+ recursion_stack[recursion_stack_position].id = static_cast<const re_brace*>(pstate)->index;
+ ++recursion_stack_position;
+ //BOOST_ASSERT(recursion_stack[recursion_stack_position-1].id);
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
+{
+ int index = static_cast<const re_brace*>(pstate)->index;
+ icase = static_cast<const re_brace*>(pstate)->icase;
+ if(index > 0)
+ {
+ if((m_match_flags & match_nosubs) == 0)
+ {
+ m_presult->set_second(position, index);
+ }
+ if(recursion_stack_position)
+ {
+ if(index == recursion_stack[recursion_stack_position-1].id)
+ {
+ --recursion_stack_position;
+ pstate = recursion_stack[recursion_stack_position].preturn_address;
+ *m_presult = recursion_stack[recursion_stack_position].results;
+ push_recursion(recursion_stack[recursion_stack_position].id, recursion_stack[recursion_stack_position].preturn_address, &recursion_stack[recursion_stack_position].results);
+ }
+ }
+ }
+ else if((index < 0) && (index != -4))
+ {
+ // matched forward lookahead:
+ pstate = 0;
+ return true;
+ }
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
+{
+ if(recursion_stack_position)
+ {
+ BOOST_ASSERT(0 == recursion_stack[recursion_stack_position-1].id);
+ --recursion_stack_position;
+ pstate = recursion_stack[recursion_stack_position].preturn_address;
+ *m_presult = recursion_stack[recursion_stack_position].results;
+ push_recursion(recursion_stack[recursion_stack_position].id, recursion_stack[recursion_stack_position].preturn_address, &recursion_stack[recursion_stack_position].results);
+ return true;
+ }
+ if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
+ return false;
+ if((m_match_flags & match_all) && (position != last))
+ return false;
+ if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
+ return false;
+ m_presult->set_second(position);
+ pstate = 0;
+ m_has_found_match = true;
+ if((m_match_flags & match_posix) == match_posix)
+ {
+ m_result.maybe_assign(*m_presult);
+ if((m_match_flags & match_any) == 0)
+ return false;
+ }
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ if(match_extra & m_match_flags)
+ {
+ for(unsigned i = 0; i < m_presult->size(); ++i)
+ if((*m_presult)[i].matched)
+ ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
+ }
+#endif
+ return true;
+}
+
 /****************************************************************************
 
 Unwind and associated proceedures follow, these perform what normal stack
@@ -858,7 +991,7 @@
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
 {
- static unwind_proc_type const s_unwind_table[14] =
+ static unwind_proc_type const s_unwind_table[18] =
    {
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_end,
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_paren,
@@ -874,6 +1007,8 @@
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
    };
 
    m_recursive_result = have_match;
@@ -907,8 +1042,8 @@
    // restore previous values if no match was found:
    if(have_match == false)
    {
- m_presult->set_first(pmp->sub.first, pmp->index);
- m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched);
+ m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0);
+ m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0);
    }
 #ifdef BOOST_REGEX_MATCH_EXTRA
    //
@@ -1377,6 +1512,106 @@
    return r;
 }
 
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion(bool r)
+{
+ saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
+ if(!r)
+ {
+ recursion_stack[recursion_stack_position].id = pmp->recursion_id;
+ recursion_stack[recursion_stack_position].preturn_address = pmp->preturn_address;
+ recursion_stack[recursion_stack_position].results = pmp->results;
+ ++recursion_stack_position;
+ }
+ boost::re_detail::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ if(!r)
+ {
+ --recursion_stack_position;
+ }
+ boost::re_detail::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_pop()
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_state(15);
+ m_backup_state = pmp;
+}
+/*
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_pop(bool r)
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ if(!r)
+ {
+ --parenthesis_stack_position;
+ }
+ boost::re_detail::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_pop()
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_state(16);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_push(bool r)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ if(!r)
+ {
+ parenthesis_stack[parenthesis_stack_position++] = pmp->position;
+ }
+ boost::re_detail::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_push(BidiIterator p)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_position<BidiIterator>(0, p, 17);
+ m_backup_state = pmp;
+}
+*/
 } // namespace re_detail
 } // namespace boost
 

Modified: branches/release/boost/regex/v4/perl_matcher_recursive.hpp
==============================================================================
--- branches/release/boost/regex/v4/perl_matcher_recursive.hpp (original)
+++ branches/release/boost/regex/v4/perl_matcher_recursive.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -51,8 +51,8 @@
    template <class A>
    void restore(match_results<BidiIterator, A>& w)
    {
- w.set_first(sub.first, index);
- w.set_second(sub.second, index, sub.matched);
+ w.set_first(sub.first, index, index == 0);
+ w.set_second(sub.second, index, sub.matched, index == 0);
    }
    const sub_match<BidiIterator>& get() { return sub; }
 };
@@ -60,7 +60,7 @@
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
 {
- static matcher_proc_type const s_match_vtable[29] =
+ static matcher_proc_type const s_match_vtable[30] =
    {
       (&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
       &perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
@@ -84,13 +84,18 @@
       &perl_matcher<BidiIterator, Allocator, traits>::match_combining,
       &perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
       &perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
- (::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
+ // Although this next line *should* be evaluated at compile time, in practice
+ // some compilers (VC++) emit run-time initialisation which breaks thread
+ // safety, so use a dispatch function instead:
+ //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
+ &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
       &perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
       &perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
       &perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
       &perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
    };
 
    if(state_count > max_state_count)
@@ -113,6 +118,7 @@
 bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
 {
    int index = static_cast<const re_brace*>(pstate)->index;
+ icase = static_cast<const re_brace*>(pstate)->icase;
    bool r = true;
    switch(index)
    {
@@ -205,6 +211,17 @@
          break;
       }
       }
+ case -5:
+ {
+ // Reset start of $0, since we have a \K escape
+ backup_subex<BidiIterator> sub(*m_presult, 0);
+ m_presult->set_first(position, 0, true);
+ pstate = pstate->next.p;
+ r = match_all_states();
+ if(r == false)
+ sub.restore(*m_presult);
+ break;
+ }
    default:
    {
       BOOST_ASSERT(index > 0);
@@ -833,6 +850,127 @@
 #endif
 }
 
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
+{
+ BOOST_ASSERT(pstate->type == syntax_element_recurse);
+ //
+ // Set new call stack:
+ //
+ if(recursion_stack_position >= static_cast<int>(sizeof(recursion_stack)/sizeof(recursion_stack[0])))
+ {
+ return false;
+ }
+ recursion_stack[recursion_stack_position].preturn_address = pstate->next.p;
+ recursion_stack[recursion_stack_position].results = *m_presult;
+ recursion_stack[recursion_stack_position].repeater_stack = next_count;
+ pstate = static_cast<const re_jump*>(pstate)->alt.p;
+ recursion_stack[recursion_stack_position].id = static_cast<const re_brace*>(pstate)->index;
+ ++recursion_stack_position;
+
+ repeater_count<BidiIterator>* saved = next_count;
+ repeater_count<BidiIterator> r(&next_count); // resets all repeat counts since we're recursing and starting fresh on those
+ next_count = &r;
+ bool result = match_all_states();
+ next_count = saved;
+
+ if(!result)
+ {
+ --recursion_stack_position;
+ next_count = recursion_stack[recursion_stack_position].repeater_stack;
+ *m_presult = recursion_stack[recursion_stack_position].results;
+ return false;
+ }
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
+{
+ int index = static_cast<const re_brace*>(pstate)->index;
+ icase = static_cast<const re_brace*>(pstate)->icase;
+ if(index > 0)
+ {
+ if((m_match_flags & match_nosubs) == 0)
+ {
+ m_presult->set_second(position, index);
+ }
+ if(recursion_stack_position)
+ {
+ if(index == recursion_stack[recursion_stack_position-1].id)
+ {
+ --recursion_stack_position;
+ recursion_info<results_type> saved = recursion_stack[recursion_stack_position];
+ const re_syntax_base* saved_state = pstate = saved.preturn_address;
+ repeater_count<BidiIterator>* saved_count = next_count;
+ next_count = saved.repeater_stack;
+ *m_presult = saved.results;
+ if(!match_all_states())
+ {
+ recursion_stack[recursion_stack_position] = saved;
+ ++recursion_stack_position;
+ next_count = saved_count;
+ return false;
+ }
+ }
+ }
+ }
+ else if((index < 0) && (index != -4))
+ {
+ // matched forward lookahead:
+ pstate = 0;
+ return true;
+ }
+ pstate = pstate ? pstate->next.p : 0;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
+{
+ if(recursion_stack_position)
+ {
+ BOOST_ASSERT(0 == recursion_stack[recursion_stack_position-1].id);
+ --recursion_stack_position;
+ const re_syntax_base* saved_state = pstate = recursion_stack[recursion_stack_position].preturn_address;
+ *m_presult = recursion_stack[recursion_stack_position].results;
+ if(!match_all_states())
+ {
+ recursion_stack[recursion_stack_position].preturn_address = saved_state;
+ recursion_stack[recursion_stack_position].results = *m_presult;
+ ++recursion_stack_position;
+ return false;
+ }
+ return true;
+ }
+ if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
+ return false;
+ if((m_match_flags & match_all) && (position != last))
+ return false;
+ if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
+ return false;
+ m_presult->set_second(position);
+ pstate = 0;
+ m_has_found_match = true;
+ if((m_match_flags & match_posix) == match_posix)
+ {
+ m_result.maybe_assign(*m_presult);
+ if((m_match_flags & match_any) == 0)
+ return false;
+ }
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ if(match_extra & m_match_flags)
+ {
+ for(unsigned i = 0; i < m_presult->size(); ++i)
+ if((*m_presult)[i].matched)
+ ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
+ }
+#endif
+ return true;
+}
+
+
+
 } // namespace re_detail
 } // namespace boost
 #ifdef BOOST_MSVC

Modified: branches/release/boost/regex/v4/regex_format.hpp
==============================================================================
--- branches/release/boost/regex/v4/regex_format.hpp (original)
+++ branches/release/boost/regex/v4/regex_format.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -107,6 +107,7 @@
    void format_escape();
    void format_conditional();
    void format_until_scope_end();
+ bool handle_perl_verb(bool have_brace);
 
    const traits& m_traits; // the traits class for localised formatting operations
    const Results& m_results; // the match_results being used.
@@ -250,6 +251,25 @@
    case '$':
       put(*m_position++);
       break;
+ case '+':
+ if((++m_position != m_end) && (*m_position == '{'))
+ {
+ const char_type* base = ++m_position;
+ while((m_position != m_end) && (*m_position != '}')) ++m_position;
+ if(m_position != m_end)
+ {
+ // Named sub-expression:
+ put(this->m_results.named_subexpression(base, m_position));
+ ++m_position;
+ break;
+ }
+ else
+ {
+ m_position = --base;
+ }
+ }
+ put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]);
+ break;
    case '{':
       have_brace = true;
       ++m_position;
@@ -258,14 +278,18 @@
       // see if we have a number:
       {
          std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
- len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
+ //len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
          int v = m_traits.toi(m_position, m_position + len, 10);
          if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}'))))
          {
- // leave the $ as is, and carry on:
- m_position = --save_position;
- put(*m_position);
- ++m_position;
+ // Look for a Perl-5.10 verb:
+ if(!handle_perl_verb(have_brace))
+ {
+ // leave the $ as is, and carry on:
+ m_position = --save_position;
+ put(*m_position);
+ ++m_position;
+ }
             break;
          }
          // otherwise output sub v:
@@ -277,6 +301,123 @@
 }
 
 template <class OutputIterator, class Results, class traits>
+bool basic_regex_formatter<OutputIterator, Results, traits>::handle_perl_verb(bool have_brace)
+{
+ //
+ // We may have a capitalised string containing a Perl action:
+ //
+ static const char_type MATCH[] = { 'M', 'A', 'T', 'C', 'H' };
+ static const char_type PREMATCH[] = { 'P', 'R', 'E', 'M', 'A', 'T', 'C', 'H' };
+ static const char_type POSTMATCH[] = { 'P', 'O', 'S', 'T', 'M', 'A', 'T', 'C', 'H' };
+ static const char_type LAST_PAREN_MATCH[] = { 'L', 'A', 'S', 'T', '_', 'P', 'A', 'R', 'E', 'N', '_', 'M', 'A', 'T', 'C', 'H' };
+ static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' };
+ static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' };
+
+ if(have_brace && (*m_position == '^'))
+ ++m_position;
+
+ int max_len = m_end - m_position;
+
+ if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH))
+ {
+ m_position += 5;
+ if(have_brace)
+ {
+ if(*m_position == '}')
+ ++m_position;
+ else
+ {
+ m_position -= 5;
+ return false;
+ }
+ }
+ put(this->m_results[0]);
+ return true;
+ }
+ if((max_len >= 8) && std::equal(m_position, m_position + 8, PREMATCH))
+ {
+ m_position += 8;
+ if(have_brace)
+ {
+ if(*m_position == '}')
+ ++m_position;
+ else
+ {
+ m_position -= 8;
+ return false;
+ }
+ }
+ put(this->m_results.prefix());
+ return true;
+ }
+ if((max_len >= 9) && std::equal(m_position, m_position + 9, POSTMATCH))
+ {
+ m_position += 9;
+ if(have_brace)
+ {
+ if(*m_position == '}')
+ ++m_position;
+ else
+ {
+ m_position -= 9;
+ return false;
+ }
+ }
+ put(this->m_results.suffix());
+ return true;
+ }
+ if((max_len >= 16) && std::equal(m_position, m_position + 16, LAST_PAREN_MATCH))
+ {
+ m_position += 16;
+ if(have_brace)
+ {
+ if(*m_position == '}')
+ ++m_position;
+ else
+ {
+ m_position -= 16;
+ return false;
+ }
+ }
+ put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]);
+ return true;
+ }
+ if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT))
+ {
+ m_position += 20;
+ if(have_brace)
+ {
+ if(*m_position == '}')
+ ++m_position;
+ else
+ {
+ m_position -= 20;
+ return false;
+ }
+ }
+ put(this->m_results.get_last_closed_paren());
+ return true;
+ }
+ if((max_len >= 2) && std::equal(m_position, m_position + 2, LAST_SUBMATCH_RESULT_ALT))
+ {
+ m_position += 2;
+ if(have_brace)
+ {
+ if(*m_position == '}')
+ ++m_position;
+ else
+ {
+ m_position -= 2;
+ return false;
+ }
+ }
+ put(this->m_results.get_last_closed_paren());
+ return true;
+ }
+ return false;
+}
+
+template <class OutputIterator, class Results, class traits>
 void basic_regex_formatter<OutputIterator, Results, traits>::format_escape()
 {
    // skip the escape and check for trailing escape:
@@ -440,9 +581,35 @@
       put(static_cast<char_type>('?'));
       return;
    }
- std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
- len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
- int v = m_traits.toi(m_position, m_position + len, 10);
+ int v;
+ if(*m_position == '{')
+ {
+ const char_type* base = m_position;
+ ++m_position;
+ v = m_traits.toi(m_position, m_end, 10);
+ if(v < 0)
+ {
+ // Try a named subexpression:
+ while((m_position != m_end) && (*m_position != '}'))
+ ++m_position;
+ v = m_results.named_subexpression_index(base + 1, m_position);
+ }
+ if((v < 0) || (*m_position != '}'))
+ {
+ m_position = base;
+ // oops trailing '?':
+ put(static_cast<char_type>('?'));
+ return;
+ }
+ // Skip trailing '}':
+ ++m_position;
+ }
+ else
+ {
+ std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end);
+ len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
+ v = m_traits.toi(m_position, m_position + len, 10);
+ }
    if(v < 0)
    {
       // oops not a number:

Modified: branches/release/boost/regex/v4/regex_traits_defaults.hpp
==============================================================================
--- branches/release/boost/regex/v4/regex_traits_defaults.hpp (original)
+++ branches/release/boost/regex/v4/regex_traits_defaults.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -159,7 +159,7 @@
 template <class charT>
 int get_default_class_id(const charT* p1, const charT* p2)
 {
- static const charT data[72] = {
+ static const charT data[73] = {
       'a', 'l', 'n', 'u', 'm',
       'a', 'l', 'p', 'h', 'a',
       'b', 'l', 'a', 'n', 'k',
@@ -172,11 +172,12 @@
       's', 'p', 'a', 'c', 'e',
       'u', 'n', 'i', 'c', 'o', 'd', 'e',
       'u', 'p', 'p', 'e', 'r',
+ 'v',
       'w', 'o', 'r', 'd',
       'x', 'd', 'i', 'g', 'i', 't',
    };
 
- static const character_pointer_range<charT> ranges[19] =
+ static const character_pointer_range<charT> ranges[21] =
    {
       {data+0, data+5,}, // alnum
       {data+5, data+10,}, // alpha
@@ -185,6 +186,7 @@
       {data+20, data+21,}, // d
       {data+20, data+25,}, // digit
       {data+25, data+30,}, // graph
+ {data+29, data+30,}, // h
       {data+30, data+31,}, // l
       {data+30, data+35,}, // lower
       {data+35, data+40,}, // print
@@ -194,9 +196,10 @@
       {data+57, data+58,}, // u
       {data+50, data+57,}, // unicode
       {data+57, data+62,}, // upper
- {data+62, data+63,}, // w
- {data+62, data+66,}, // word
- {data+66, data+72,}, // xdigit
+ {data+62, data+63,}, // v
+ {data+63, data+64,}, // w
+ {data+63, data+67,}, // word
+ {data+67, data+73,}, // xdigit
    };
    static const character_pointer_range<charT>* ranges_begin = ranges;
    static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
@@ -314,6 +317,43 @@
    return result;
 }
 
+template <class charT>
+inline const charT* get_escape_R_string()
+{
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4309)
+#endif
+ static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}',
+ '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' };
+ static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };
+
+ charT c = static_cast<charT>(0x2029u);
+ bool b = (static_cast<unsigned>(c) == 0x2029u);
+
+ return (b ? e1 : e2);
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+}
+
+template <>
+inline const char* get_escape_R_string<char>()
+{
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4309)
+#endif
+ static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };
+ return e2;
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+}
+
 } // re_detail
 } // boost
 

Modified: branches/release/boost/regex/v4/regex_workaround.hpp
==============================================================================
--- branches/release/boost/regex/v4/regex_workaround.hpp (original)
+++ branches/release/boost/regex/v4/regex_workaround.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -124,7 +124,7 @@
 
 #ifdef __cplusplus
 namespace boost{ namespace re_detail{
-#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(_CPPLIB_VER) && defined(BOOST_DINKUMWARE_STDLIB) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && BOOST_WORKAROUND(BOOST_MSVC, <1600) && defined(_CPPLIB_VER) && defined(BOOST_DINKUMWARE_STDLIB) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
    //
    // MSVC 8 will either emit warnings or else refuse to compile
    // code that makes perfectly legitimate use of std::copy, when

Modified: branches/release/boost/regex/v4/states.hpp
==============================================================================
--- branches/release/boost/regex/v4/states.hpp (original)
+++ branches/release/boost/regex/v4/states.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -118,7 +118,9 @@
    syntax_element_backstep = syntax_element_long_set_rep + 1,
    // an assertion that a mark was matched:
    syntax_element_assert_backref = syntax_element_backstep + 1,
- syntax_element_toggle_case = syntax_element_assert_backref + 1
+ syntax_element_toggle_case = syntax_element_assert_backref + 1,
+ // a recursive expression:
+ syntax_element_recurse = syntax_element_toggle_case + 1
 };
 
 #ifdef BOOST_REGEX_DEBUG
@@ -156,6 +158,7 @@
    // The index to match, can be zero (don't mark the sub-expression)
    // or negative (for perl style (?...) extentions):
    int index;
+ bool icase;
 };
 
 /*** struct re_dot **************************************************

Modified: branches/release/boost/regex/v4/syntax_type.hpp
==============================================================================
--- branches/release/boost/regex/v4/syntax_type.hpp (original)
+++ branches/release/boost/regex/v4/syntax_type.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -92,8 +92,11 @@
 static const escape_syntax_type escape_type_property = 54; // for \p
 static const escape_syntax_type escape_type_not_property = 55; // for \P
 static const escape_syntax_type escape_type_named_char = 56; // for \N
+static const escape_syntax_type escape_type_extended_backref = 57; // for \g
+static const escape_syntax_type escape_type_reset_start_mark = 58; // for \K
+static const escape_syntax_type escape_type_line_ending = 59; // for \R
 
-static const escape_syntax_type syntax_max = 57;
+static const escape_syntax_type syntax_max = 60;
 
 }
 }

Modified: branches/release/boost/regex/v4/w32_regex_traits.hpp
==============================================================================
--- branches/release/boost/regex/v4/w32_regex_traits.hpp (original)
+++ branches/release/boost/regex/v4/w32_regex_traits.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -294,6 +294,8 @@
    typedef typename w32_regex_traits<charT>::char_class_type char_class_type;
    BOOST_STATIC_CONSTANT(char_class_type, mask_word = 0x0400); // must be C1_DEFINED << 1
    BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 0x0800); // must be C1_DEFINED << 2
+ BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 0x1000); // must be C1_DEFINED << 3
+ BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 0x2000); // must be C1_DEFINED << 4
    BOOST_STATIC_CONSTANT(char_class_type, mask_base = 0x3ff); // all the masks used by the CT_CTYPE1 group
 
    typedef std::basic_string<charT> string_type;
@@ -510,7 +512,7 @@
 typename w32_regex_traits_implementation<charT>::char_class_type
    w32_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
 {
- static const char_class_type masks[20] =
+ static const char_class_type masks[22] =
    {
       0,
       0x0104u, // C1_ALPHA | C1_DIGIT
@@ -520,6 +522,7 @@
       0x0004u, // C1_DIGIT
       0x0004u, // C1_DIGIT
       (~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK
+ w32_regex_traits_implementation<charT>::mask_horizontal,
       0x0002u, // C1_LOWER
       0x0002u, // C1_LOWER
       (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
@@ -529,6 +532,7 @@
       0x0001u, // C1_UPPER
       w32_regex_traits_implementation<charT>::mask_unicode,
       0x0001u, // C1_UPPER
+ w32_regex_traits_implementation<charT>::mask_vertical,
       0x0104u | w32_regex_traits_implementation<charT>::mask_word,
       0x0104u | w32_regex_traits_implementation<charT>::mask_word,
       0x0080u, // C1_XDIGIT
@@ -628,6 +632,12 @@
          return true;
       else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_word) && (c == '_'))
          return true;
+ else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_vertical)
+ && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ return true;
+ else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_horizontal)
+ && this->isctype(c, 0x0008u) && !this->isctype(c, re_detail::w32_regex_traits_implementation<charT>::mask_vertical))
+ return true;
       return false;
    }
    int toi(const charT*& p1, const charT* p2, int radix)const

Modified: branches/release/libs/regex/build/Jamfile.v2
==============================================================================
--- branches/release/libs/regex/build/Jamfile.v2 (original)
+++ branches/release/libs/regex/build/Jamfile.v2 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -22,7 +22,7 @@
 
    if ! $(gICU_CONFIG_CHECKED)
    {
- if $(HAVE_ICU)
+ if $(HAVE_ICU) && ! $(ICU_PATH)
       {
          gHAS_ICU = true ;
          gICU_CORE_LIB = icuuc ;
@@ -79,6 +79,10 @@
             {
                gICU_IN_LIB = icuin ;
             }
+ else if [ GLOB $(dir)/lib : icui18n.* ]
+ {
+ gICU_IN_LIB = icui18n ;
+ }
             else if [ GLOB $(dir)/lib64 : libicui18n.* ]
             {
                gICU_IN_LIB = icui18n ;

Modified: branches/release/libs/regex/doc/format_boost_syntax.qbk
==============================================================================
--- branches/release/libs/regex/doc/format_boost_syntax.qbk (original)
+++ branches/release/libs/regex/doc/format_boost_syntax.qbk 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -33,6 +33,15 @@
 For example, the format string "(?1foo:bar)" will replace each match found with "foo" if
 the sub-expression $1 was matched, and with "bar" otherwise.
 
+For sub-expressions with an index greater than 9, or for access to named sub-expressions use:
+
+?{INDEX}true-expression:false-expression
+
+or
+
+?{NAME}true-expression:false-expression
+
+
 [h4 Placeholder Sequences]
 
 Placeholder sequences specify that some part of what matched the regular expression
@@ -41,12 +50,24 @@
 [table
 [[Placeholder][Meaning]]
 [[$&][Outputs what matched the whole expression.]]
-[[$`][Outputs the text between the end of the last match found (or the
- start of the text if no previous match was found), and the start
- of the current match.]]
+[[$MATCH][As $&]]
+[[${^MATCH}][As $&]]
+[[$\`][Outputs the text between the end of the last match found (or the
+ start of the text if no previous match was found), and the start
+ of the current match.]]
+[[$PREMATCH][As $\`]]
+[[${^PREMATCH}][As $\`]]
 [[$'][Outputs all the text following the end of the current match.]]
+[[$POSTMATCH][As $']]
+[[${^POSTMATCH}][As $']]
+[[$+][Outputs what matched the last marked sub-expression in the regular expression.]]
+[[$LAST_PAREN_MATCH][As $+]]
+[[$LAST_SUBMATCH_RESULT][Outputs what matched the last sub-expression to be actually matched.]]
+[[$^N][As $LAST_SUBMATCH_RESULT]]
 [[$$][Outputs a literal '$']]
 [[$n][Outputs what matched the n'th sub-expression.]]
+[[${n}][Outputs what matched the n'th sub-expression.]]
+[[$+{NAME}][Outputs whatever matched the sub-expression named "NAME".]]
 ]
 
 Any $-placeholder sequence not listed above, results in '$' being treated as a literal.

Modified: branches/release/libs/regex/doc/format_perl_syntax.qbk
==============================================================================
--- branches/release/libs/regex/doc/format_perl_syntax.qbk (original)
+++ branches/release/libs/regex/doc/format_perl_syntax.qbk 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -17,13 +17,24 @@
 [table
 [[Placeholder][Meaning]]
 [[$&][Outputs what matched the whole expression.]]
-[[$`][Outputs the text between the end of the last match found (or the
+[[$MATCH][As $&]]
+[[${^MATCH}][As $&]]
+[[$\`][Outputs the text between the end of the last match found (or the
       start of the text if no previous match was found), and the start
       of the current match.]]
+[[$PREMATCH][As $\`]]
+[[${^PREMATCH}][As $\`]]
 [[$'][Outputs all the text following the end of the current match.]]
+[[$POSTMATCH][As $']]
+[[${^POSTMATCH}][As $']]
+[[$+][Outputs what matched the last marked sub-expression in the regular expression.]]
+[[$LAST_PAREN_MATCH][As $+]]
+[[$LAST_SUBMATCH_RESULT][Outputs what matched the last sub-expression to be actually matched.]]
+[[$^N][As $LAST_SUBMATCH_RESULT]]
 [[$$][Outputs a literal '$']]
 [[$n][Outputs what matched the n'th sub-expression.]]
 [[${n}][Outputs what matched the n'th sub-expression.]]
+[[$+{NAME}][Outputs whatever matched the sub-expression named "NAME".]]
 ]
 
 Any $-placeholder sequence not listed above, results in '$' being treated

Modified: branches/release/libs/regex/doc/history.qbk
==============================================================================
--- branches/release/libs/regex/doc/history.qbk (original)
+++ branches/release/libs/regex/doc/history.qbk 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -8,6 +8,11 @@
 
 [section:history History]
 
+[h4 Boost 1.40]
+
+* Added support for many Perl 5.10 syntax elements including named
+sub-expressions, branch resets and recursive regular expressions.
+
 [h4 Boost 1.38]
 
 * [*Breaking change]: empty expressions, and empty alternatives are now

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Background Information</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/acknowledgements.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/acknowledgements.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/acknowledgements.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Acknowledgements</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="redist.html" title="Redistributables">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/examples.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/examples.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/examples.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Test and Example Programs</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="thread_safety.html" title="Thread Safety">
@@ -28,7 +28,7 @@
       Example Programs</a>
 </h3></div></div></div>
 <a name="boost_regex.background_information.examples.test_programs"></a><h5>
-<a name="id685550"></a>
+<a name="id805166"></a>
         <a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test
         Programs</a>
       </h5>
@@ -107,7 +107,7 @@
         Files: captures_test.cpp.
       </p>
 <a name="boost_regex.background_information.examples.example_programs"></a><h5>
-<a name="id685938"></a>
+<a name="id805469"></a>
         <a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example
         programs</a>
       </h5>
@@ -133,7 +133,7 @@
         Files: regex_timer.cpp.
       </p>
 <a name="boost_regex.background_information.examples.code_snippets"></a><h5>
-<a name="id686019"></a>
+<a name="id805528"></a>
         <a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
         snippets</a>
       </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/faq.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/faq.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/faq.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>FAQ</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="futher.html" title="References and Further Information">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/futher.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/futher.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/futher.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>References and Further Information</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="examples.html" title="Test and Example Programs">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/headers.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/headers.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/headers.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Headers</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="../background_information.html" title="Background Information">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/history.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/history.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/history.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>History</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="acknowledgements.html" title="Acknowledgements">
@@ -25,8 +25,17 @@
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_regex.background_information.history"></a><a class="link" href="history.html" title="History"> History</a>
 </h3></div></div></div>
+<a name="boost_regex.background_information.history.boost_1_40"></a><h5>
+<a name="id807313"></a>
+ <a class="link" href="history.html#boost_regex.background_information.history.boost_1_40">Boost
+ 1.40</a>
+ </h5>
+<div class="itemizedlist"><ul type="disc"><li>
+ Added support for many Perl 5.10 syntax elements including named sub-expressions,
+ branch resets and recursive regular expressions.
+ </li></ul></div>
 <a name="boost_regex.background_information.history.boost_1_38"></a><h5>
-<a name="id688173"></a>
+<a name="id807333"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
         1.38</a>
       </h5>
@@ -36,7 +45,7 @@
           empty alternatives are now allowed when using the Perl regular expression
           syntax. This change has been added for Perl compatibility, when the new
           <a class="link" href="../ref/syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a><span class="emphasis"><em>no_empty_expressions</em></span> is set then the old behaviour
- is preserved and empty expressions are prohibited.
+ is preserved and empty expressions are prohibited. This is issue #1081.
         </li>
 <li>
           Added support for Perl style ${n} expressions in format strings (issue
@@ -53,7 +62,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_34"></a><h5>
-<a name="id688292"></a>
+<a name="id807411"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
         1.34</a>
       </h5>
@@ -76,7 +85,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
-<a name="id688343"></a>
+<a name="id807442"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
         1.33.1</a>
       </h5>
@@ -146,7 +155,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
-<a name="id688472"></a>
+<a name="id807522"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
         1.33.0</a>
       </h5>
@@ -201,7 +210,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
-<a name="id688569"></a>
+<a name="id807580"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
         1.32.1</a>
       </h5>
@@ -209,7 +218,7 @@
           Fixed bug in partial matches of bounded repeats of '.'.
         </li></ul></div>
 <a name="boost_regex.background_information.history.boost_1_31_0"></a><h5>
-<a name="id688603"></a>
+<a name="id807601"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
         1.31.0</a>
       </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/locale.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/locale.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/locale.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Localization</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="headers.html" title="Headers">
@@ -58,7 +58,7 @@
         There are three separate localization mechanisms supported by Boost.Regex:
       </p>
 <a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5>
-<a name="id682058"></a>
+<a name="id802331"></a>
         <a class="link" href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32
         localization model.</a>
       </h5>
@@ -90,7 +90,7 @@
         are treated as "unknown" graphic characters.
       </p>
 <a name="boost_regex.background_information.locale.c_localization_model_"></a><h5>
-<a name="id682296"></a>
+<a name="id802486"></a>
         <a class="link" href="locale.html#boost_regex.background_information.locale.c_localization_model_">C
         localization model.</a>
       </h5>
@@ -114,7 +114,7 @@
         libraries including version 1 of this library.
       </p>
 <a name="boost_regex.background_information.locale.c___localization_model_"></a><h5>
-<a name="id682409"></a>
+<a name="id802554"></a>
         <a class="link" href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++
         localization model.</a>
       </h5>
@@ -151,7 +151,7 @@
         in your code. The best way to ensure this is to add the #define to <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
       </p>
 <a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
-<a name="id682868"></a>
+<a name="id802855"></a>
         <a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
         a message catalogue</a>
       </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/performance.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/performance.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/performance.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Performance</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="faq.html" title="FAQ">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/redist.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/redist.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/redist.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Redistributables</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="standards.html" title="Standards Conformance">

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/standards.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/standards.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/standards.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Standards Conformance</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="performance.html" title="Performance">
@@ -28,7 +28,7 @@
       Conformance</a>
 </h3></div></div></div>
 <a name="boost_regex.background_information.standards.c__"></a><h5>
-<a name="id686998"></a>
+<a name="id806454"></a>
         <a class="link" href="standards.html#boost_regex.background_information.standards.c__">C++</a>
       </h5>
 <p>
@@ -36,7 +36,7 @@
         Report on C++ Library Extensions</a>.
       </p>
 <a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5>
-<a name="id687036"></a>
+<a name="id806475"></a>
         <a class="link" href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
         / JavaScript</a>
       </h5>
@@ -49,7 +49,7 @@
         rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
       </p>
 <a name="boost_regex.background_information.standards.perl"></a><h5>
-<a name="id687075"></a>
+<a name="id806496"></a>
         <a class="link" href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
       </h5>
 <p>
@@ -62,7 +62,7 @@
         (??{code}) Not implementable in a compiled strongly typed language.
       </p>
 <a name="boost_regex.background_information.standards.posix"></a><h5>
-<a name="id687114"></a>
+<a name="id806520"></a>
         <a class="link" href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
       </h5>
 <p>
@@ -82,7 +82,7 @@
         a custom traits class.
       </p>
 <a name="boost_regex.background_information.standards.unicode"></a><h5>
-<a name="id687161"></a>
+<a name="id806544"></a>
         <a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/background_information/thread_safety.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/background_information/thread_safety.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/background_information/thread_safety.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Thread Safety</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../background_information.html" title="Background Information">
 <link rel="prev" href="locale.html" title="Localization">

Modified: branches/release/libs/regex/doc/html/boost_regex/captures.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/captures.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/captures.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Understanding Marked Sub-Expressions and Captures</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="unicode.html" title="Unicode and Boost.Regex">
@@ -35,7 +35,7 @@
       accessed.
     </p>
 <a name="boost_regex.captures.marked_sub_expressions"></a><h5>
-<a name="id530356"></a>
+<a name="id648883"></a>
       <a class="link" href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a>
     </h5>
 <p>
@@ -218,7 +218,7 @@
       output stream.
     </p>
 <a name="boost_regex.captures.unmatched_sub_expressions"></a><h5>
-<a name="id530979"></a>
+<a name="id649339"></a>
       <a class="link" href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a>
     </h5>
 <p>
@@ -231,7 +231,7 @@
       you can determine which sub-expressions matched by accessing the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></code> data member.
     </p>
 <a name="boost_regex.captures.repeated_captures"></a><h5>
-<a name="id531042"></a>
+<a name="id649379"></a>
       <a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
     </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/configuration.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/configuration.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/configuration.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Configuration</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="../index.html" title="Boost.Regex">

Modified: branches/release/libs/regex/doc/html/boost_regex/configuration/algorithm.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/configuration/algorithm.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/configuration/algorithm.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Algorithm Selection</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../configuration.html" title="Configuration">
 <link rel="prev" href="linkage.html" title="Linkage Options">

Modified: branches/release/libs/regex/doc/html/boost_regex/configuration/compiler.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/configuration/compiler.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/configuration/compiler.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Compiler Setup</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../configuration.html" title="Configuration">
 <link rel="prev" href="../configuration.html" title="Configuration">

Modified: branches/release/libs/regex/doc/html/boost_regex/configuration/linkage.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/configuration/linkage.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/configuration/linkage.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Linkage Options</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../configuration.html" title="Configuration">
 <link rel="prev" href="locale.html" title="Locale and traits class selection">

Modified: branches/release/libs/regex/doc/html/boost_regex/configuration/locale.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/configuration/locale.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/configuration/locale.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Locale and traits class selection</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../configuration.html" title="Configuration">
 <link rel="prev" href="compiler.html" title="Compiler Setup">

Modified: branches/release/libs/regex/doc/html/boost_regex/configuration/tuning.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/configuration/tuning.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/configuration/tuning.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Algorithm Tuning</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../configuration.html" title="Configuration">
 <link rel="prev" href="algorithm.html" title="Algorithm Selection">

Modified: branches/release/libs/regex/doc/html/boost_regex/format.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/format.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/format.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Search and Replace Format String Syntax</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">

Modified: branches/release/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Boost-Extended Format String Syntax</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
 <link rel="prev" href="perl_format.html" title="Perl Format String Syntax">
@@ -32,7 +32,7 @@
         '$', '\', '(', ')', '?', and ':'.
       </p>
 <a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
-<a name="id552944"></a>
+<a name="id670774"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a>
       </h5>
 <p>
@@ -40,7 +40,7 @@
         you want a to output literal parenthesis.
       </p>
 <a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5>
-<a name="id552974"></a>
+<a name="id670790"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
       </h5>
 <p>
@@ -65,8 +65,21 @@
         match found with "foo" if the sub-expression $1 was matched, and
         with "bar" otherwise.
       </p>
+<p>
+ For sub-expressions with an index greater than 9, or for access to named
+ sub-expressions use:
+ </p>
+<p>
+ ?{INDEX}true-expression:false-expression
+ </p>
+<p>
+ or
+ </p>
+<p>
+ ?{NAME}true-expression:false-expression
+ </p>
 <a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
-<a name="id553032"></a>
+<a name="id670843"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
         Sequences</a>
       </h5>
@@ -107,6 +120,30 @@
 <tr>
 <td>
               <p>
+ $MATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $&amp;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ${^MATCH}
+ </p>
+ </td>
+<td>
+ <p>
+ As $&amp;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 $`
               </p>
               </td>
@@ -121,6 +158,30 @@
 <tr>
 <td>
               <p>
+ $PREMATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $`
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ${^PREMATCH}
+ </p>
+ </td>
+<td>
+ <p>
+ As $`
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 $'
               </p>
               </td>
@@ -133,6 +194,79 @@
 <tr>
 <td>
               <p>
+ $POSTMATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ${^POSTMATCH}
+ </p>
+ </td>
+<td>
+ <p>
+ As $'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $+
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs what matched the last marked sub-expression in the regular
+ expression.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $LAST_PAREN_MATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $+
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $LAST_SUBMATCH_RESULT
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs what matched the last sub-expression to be actually matched.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $^N
+ </p>
+ </td>
+<td>
+ <p>
+ As $LAST_SUBMATCH_RESULT
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 $$
               </p>
               </td>
@@ -154,6 +288,30 @@
               </p>
               </td>
 </tr>
+<tr>
+<td>
+ <p>
+ ${n}
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs what matched the n'th sub-expression.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $+{NAME}
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs whatever matched the sub-expression named "NAME".
+ </p>
+ </td>
+</tr>
 </tbody>
 </table></div>
 <p>
@@ -161,7 +319,7 @@
         as a literal.
       </p>
 <a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
-<a name="id553203"></a>
+<a name="id671186"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
         Sequences</a>
       </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/format/perl_format.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/format/perl_format.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/format/perl_format.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Perl Format String Syntax</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
 <link rel="prev" href="sed_format.html" title="Sed Format String Syntax">
@@ -67,6 +67,30 @@
 <tr>
 <td>
               <p>
+ $MATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $&amp;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ${^MATCH}
+ </p>
+ </td>
+<td>
+ <p>
+ As $&amp;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 $`
               </p>
               </td>
@@ -81,6 +105,30 @@
 <tr>
 <td>
               <p>
+ $PREMATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $`
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ${^PREMATCH}
+ </p>
+ </td>
+<td>
+ <p>
+ As $`
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 $'
               </p>
               </td>
@@ -93,6 +141,79 @@
 <tr>
 <td>
               <p>
+ $POSTMATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ ${^POSTMATCH}
+ </p>
+ </td>
+<td>
+ <p>
+ As $'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $+
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs what matched the last marked sub-expression in the regular
+ expression.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $LAST_PAREN_MATCH
+ </p>
+ </td>
+<td>
+ <p>
+ As $+
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $LAST_SUBMATCH_RESULT
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs what matched the last sub-expression to be actually matched.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ $^N
+ </p>
+ </td>
+<td>
+ <p>
+ As $LAST_SUBMATCH_RESULT
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 $$
               </p>
               </td>
@@ -126,6 +247,18 @@
               </p>
               </td>
 </tr>
+<tr>
+<td>
+ <p>
+ $+{NAME}
+ </p>
+ </td>
+<td>
+ <p>
+ Outputs whatever matched the sub-expression named "NAME".
+ </p>
+ </td>
+</tr>
 </tbody>
 </table></div>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/format/sed_format.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/format/sed_format.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/format/sed_format.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Sed Format String Syntax</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
 <link rel="prev" href="../format.html" title="Search and Replace Format String Syntax">

Modified: branches/release/libs/regex/doc/html/boost_regex/install.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/install.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/install.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Building and Installing the Library</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="configuration/tuning.html" title="Algorithm Tuning">
@@ -49,7 +49,7 @@
       file before you can use it, instructions for specific platforms are as follows:
     </p>
 <a name="boost_regex.install.building_with_bjam"></a><h5>
-<a name="id473594"></a>
+<a name="id646143"></a>
       <a class="link" href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a>
     </h5>
 <p>
@@ -58,7 +58,7 @@
       started guide</a> for more information.
     </p>
 <a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5>
-<a name="id473628"></a>
+<a name="id646167"></a>
       <a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building
       With Unicode and ICU Support</a>
     </h5>
@@ -96,11 +96,11 @@
       ICU you are using is binary compatible with the toolset you use to build Boost.
     </p>
 <a name="boost_regex.install.building_via_makefiles"></a><h5>
-<a name="id473176"></a>
+<a name="id646286"></a>
       <a class="link" href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a>
     </h5>
 <a name="boost_regex.install.borland_c___builder_"></a><h6>
-<a name="id473199"></a>
+<a name="id646299"></a>
       <a class="link" href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
     </h6>
 <div class="itemizedlist"><ul type="disc">
@@ -166,7 +166,7 @@
       a lot in compile times!
     </p>
 <a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5>
-<a name="id527567"></a>
+<a name="id646538"></a>
       <a class="link" href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft
       Visual C++ 6, 7, 7.1 and 8</a>
     </h5>
@@ -253,7 +253,7 @@
       </li>
 </ul></div>
 <a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
-<a name="id527884"></a>
+<a name="id646737"></a>
       <a class="link" href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
     </h6>
 <p>
@@ -302,7 +302,7 @@
       see the config library documentation.
     </p>
 <a name="boost_regex.install.sun_workshop_6_1"></a><h6>
-<a name="id528091"></a>
+<a name="id646863"></a>
       <a class="link" href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
     </h6>
 <p>
@@ -347,7 +347,7 @@
       will build v9 variants of the regex library named libboost_regex_v9.a etc.
     </p>
 <a name="boost_regex.install.makefiles_for_other_compilers"></a><h6>
-<a name="id528312"></a>
+<a name="id647007"></a>
       <a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
       for Other compilers</a>
     </h6>

Modified: branches/release/libs/regex/doc/html/boost_regex/introduction_and_overview.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/introduction_and_overview.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/introduction_and_overview.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Introduction and Overview</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="install.html" title="Building and Installing the Library">

Modified: branches/release/libs/regex/doc/html/boost_regex/partial_matches.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/partial_matches.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/partial_matches.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Partial Matches</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Reference</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/bad_expression.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/bad_expression.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/bad_expression.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>bad_expression</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="regex_token_iterator.html" title="regex_token_iterator">
@@ -27,7 +27,7 @@
 <a name="boost_regex.ref.bad_expression"></a><a class="link" href="bad_expression.html" title="bad_expression"> bad_expression</a>
 </h3></div></div></div>
 <a name="boost_regex.ref.bad_expression.synopsis"></a><h5>
-<a name="id633887"></a>
+<a name="id754064"></a>
         <a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a>
       </h5>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@@ -54,7 +54,7 @@
 <span class="special">}</span> <span class="comment">// namespace boost
 </span></pre>
 <a name="boost_regex.ref.bad_expression.description"></a><h5>
-<a name="id634390"></a>
+<a name="id754425"></a>
         <a class="link" href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a>
       </h5>
 <pre class="programlisting"><span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/basic_regex.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/basic_regex.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/basic_regex.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>basic_regex</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="../ref.html" title="Reference">
@@ -27,7 +27,7 @@
 <a name="boost_regex.ref.basic_regex"></a><a class="link" href="basic_regex.html" title="basic_regex"> basic_regex</a>
 </h3></div></div></div>
 <a name="boost_regex.ref.basic_regex.synopsis"></a><h5>
-<a name="id553616"></a>
+<a name="id671530"></a>
         <a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.synopsis">Synopsis</a>
       </h5>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@@ -244,7 +244,7 @@
 <span class="special">}</span> <span class="comment">// namespace boost
 </span></pre>
 <a name="boost_regex.ref.basic_regex.description"></a><h5>
-<a name="id559592"></a>
+<a name="id676186"></a>
         <a class="link" href="basic_regex.html#boost_regex.ref.basic_regex.description">Description</a>
       </h5>
 <p>
@@ -327,7 +327,7 @@
         <code class="computeroutput"><span class="identifier">basic_regex</span></code>.
       </p>
 <div class="table">
-<a name="id561527"></a><p class="title"><b>Table 1. basic_regex default construction postconditions</b></p>
+<a name="id679189"></a><p class="title"><b>Table 1. basic_regex default construction postconditions</b></p>
 <div class="table-contents"><table class="table" summary="basic_regex default construction postconditions">
 <colgroup>
 <col>
@@ -407,7 +407,7 @@
         flags</a> specified in <span class="emphasis"><em>f</em></span>.
       </p>
 <div class="table">
-<a name="id561926"></a><p class="title"><b>Table 2. Postconditions for basic_regex construction</b></p>
+<a name="id679487"></a><p class="title"><b>Table 2. Postconditions for basic_regex construction</b></p>
 <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
 <colgroup>
 <col>
@@ -512,7 +512,7 @@
         specified in <span class="emphasis"><em>f</em></span>.
       </p>
 <div class="table">
-<a name="id562472"></a><p class="title"><b>Table 3. Postconditions for basic_regex construction</b></p>
+<a name="id679900"></a><p class="title"><b>Table 3. Postconditions for basic_regex construction</b></p>
 <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
 <colgroup>
 <col>
@@ -616,7 +616,7 @@
         according the option flags specified in <span class="emphasis"><em>f</em></span>.
       </p>
 <div class="table">
-<a name="id563006"></a><p class="title"><b>Table 4. Postconditions for basic_regex construction</b></p>
+<a name="id680304"></a><p class="title"><b>Table 4. Postconditions for basic_regex construction</b></p>
 <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
 <colgroup>
 <col>
@@ -727,7 +727,7 @@
         flags</a> specified in <span class="emphasis"><em>f</em></span>.
       </p>
 <div class="table">
-<a name="id563641"></a><p class="title"><b>Table 5. Postconditions for basic_regex construction</b></p>
+<a name="id680784"></a><p class="title"><b>Table 5. Postconditions for basic_regex construction</b></p>
 <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
 <colgroup>
 <col>
@@ -829,7 +829,7 @@
         flags</a> specified in <span class="emphasis"><em>f</em></span>.
       </p>
 <div class="table">
-<a name="id564115"></a><p class="title"><b>Table 6. Postconditions for basic_regex construction</b></p>
+<a name="id681143"></a><p class="title"><b>Table 6. Postconditions for basic_regex construction</b></p>
 <div class="table-contents"><table class="table" summary="Postconditions for basic_regex construction">
 <colgroup>
 <col>
@@ -1043,7 +1043,7 @@
         in <span class="emphasis"><em>f</em></span>.
       </p>
 <div class="table">
-<a name="id566191"></a><p class="title"><b>Table 7. Postconditions for basic_regex::assign</b></p>
+<a name="id682659"></a><p class="title"><b>Table 7. Postconditions for basic_regex::assign</b></p>
 <div class="table-contents"><table class="table" summary="Postconditions for basic_regex::assign">
 <colgroup>
 <col>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/concepts.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/concepts.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/concepts.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Concepts</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="posix.html" title="POSIX Compatible C API's">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/concepts/charT_concept.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/concepts/charT_concept.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/concepts/charT_concept.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>charT Requirements</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../concepts.html" title="Concepts">
 <link rel="prev" href="../concepts.html" title="Concepts">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/concepts/iterator_concepts.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/concepts/iterator_concepts.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/concepts/iterator_concepts.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Iterator Requirements</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../concepts.html" title="Concepts">
 <link rel="prev" href="traits_concept.html" title="Traits Class Requirements">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Traits Class Requirements</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../concepts.html" title="Concepts">
 <link rel="prev" href="charT_concept.html" title="charT Requirements">
@@ -34,7 +34,7 @@
           Boost-specific enhanced interface.
         </p>
 <a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
-<a name="id661185"></a>
+<a name="id782143"></a>
           <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal
           requirements.</a>
         </h5>
@@ -381,7 +381,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5>
-<a name="id661996"></a>
+<a name="id782758"></a>
           <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
           Optional Requirements</a>
         </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Deprecated Interfaces</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="concepts/iterator_concepts.html" title="Iterator Requirements">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>High Level Class RegEx (Deprecated)</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
 <link rel="prev" href="regex_split.html" title="regex_split (deprecated)">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_format (Deprecated)</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
 <link rel="prev" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
@@ -34,7 +34,7 @@
           previous version of Boost.Regex and will not be further updated:
         </p>
 <a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5>
-<a name="id662740"></a>
+<a name="id783339"></a>
           <a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
           regex_format</a>
         </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_grep (Deprecated)</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
 <link rel="prev" href="regex_format.html" title="regex_format (Deprecated)">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_split (deprecated)</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
 <link rel="prev" href="regex_grep.html" title="regex_grep (Deprecated)">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/error_type.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/error_type.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/error_type.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>error_type</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="match_flag_type.html" title="match_flag_type">
@@ -27,7 +27,7 @@
 <a name="boost_regex.ref.error_type"></a><a class="link" href="error_type.html" title="error_type"> error_type</a>
 </h3></div></div></div>
 <a name="boost_regex.ref.error_type.synopsis"></a><h5>
-<a name="id640585"></a>
+<a name="id760997"></a>
         <a class="link" href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
       </h5>
 <p>
@@ -57,7 +57,7 @@
 </span><span class="special">}</span> <span class="comment">// namespace boost
 </span></pre>
 <a name="boost_regex.ref.error_type.description"></a><h5>
-<a name="id641149"></a>
+<a name="id761412"></a>
         <a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/match_flag_type.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/match_flag_type.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/match_flag_type.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>match_flag_type</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="Options for Literal Strings">
@@ -69,7 +69,7 @@
 </span><span class="special">}</span> <span class="comment">// namespace boost
 </span></pre>
 <a name="boost_regex.ref.match_flag_type.description"></a><h5>
-<a name="id639820"></a>
+<a name="id760446"></a>
         <a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/match_results.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/match_results.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/match_results.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>match_results</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="basic_regex.html" title="basic_regex">
@@ -27,7 +27,7 @@
 <a name="boost_regex.ref.match_results"></a><a class="link" href="match_results.html" title="match_results"> match_results</a>
 </h3></div></div></div>
 <a name="boost_regex.ref.match_results.synopsis"></a><h5>
-<a name="id569578"></a>
+<a name="id687993"></a>
         <a class="link" href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a>
       </h5>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@@ -98,9 +98,33 @@
    <span class="keyword">bool</span> <a class="link" href="match_results.html#boost_regex.match_results.empty">empty</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
    <span class="comment">// element access:
 </span> <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+ <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.length">length</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
    <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+ <span class="identifier">difference_type</span> <a class="link" href="match_results.html#boost_regex.match_results.position">position</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">sub</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
    <span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+ <span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+ <span class="identifier">string_type</span> <a class="link" href="match_results.html#boost_regex.match_results.str">str</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
    <span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+ <span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+ <span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+ <span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.subscript">operator[]</a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
 
    <span class="identifier">const_reference</span> <a class="link" href="match_results.html#boost_regex.match_results.prefix">prefix</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
 
@@ -142,7 +166,7 @@
          <span class="identifier">match_results</span><span class="special">&lt;</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;&amp;</span> <span class="identifier">m2</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.match_results.description"></a><h5>
-<a name="id572482"></a>
+<a name="id691227"></a>
         <a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
       </h5>
 <p>
@@ -375,14 +399,39 @@
 <a name="boost_regex.match_results.length"></a><p>
       </p>
 <pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;)</span><span class="keyword">const</span><span class="special">;</span>
 </pre>
 <p>
         <span class="bold"><strong>Effects</strong></span>: Returns the length of sub-expression
         <span class="emphasis"><em>sub</em></span>, that is to say: <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">].</span><span class="identifier">length</span><span class="special">()</span></code>.
       </p>
+<p>
+ The overloads that accept a string refer to a named sub-expression <span class="emphasis"><em>n</em></span>.
+ In the event that there is no such named sub-expression then returns an empty
+ string.
+ </p>
+<p>
+ 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: in this case the characters will be widened to the underlying
+ character type of the original regular expression. A compiler error will
+ occur if the argument passes a wider character type than the underlying sequence.
+ These overloads allow a normal narrow character C string literal to be used
+ as an argument, even when the underlying character type of the expression
+ being matched may be something more exotic such as a Unicode character type.
+ </p>
 <a name="boost_regex.match_results.position"></a><p>
       </p>
 <pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;)</span><span class="keyword">const</span><span class="special">;</span>
 </pre>
 <p>
         <span class="bold"><strong>Effects</strong></span>: Returns the starting location of
@@ -391,17 +440,61 @@
         will return the location of the partial match even though <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
         is false.
       </p>
+<p>
+ The overloads that accept a string refer to a named sub-expression <span class="emphasis"><em>n</em></span>.
+ In the event that there is no such named sub-expression then returns an empty
+ string.
+ </p>
+<p>
+ 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: in this case the characters will be widened to the underlying
+ character type of the original regular expression. A compiler error will
+ occur if the argument passes a wider character type than the underlying sequence.
+ These overloads allow a normal narrow character C string literal to be used
+ as an argument, even when the underlying character type of the expression
+ being matched may be something more exotic such as a Unicode character type.
+ </p>
 <a name="boost_regex.match_results.str"></a><p>
       </p>
 <pre class="programlisting"><span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">sub</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
 </pre>
 <p>
         <span class="bold"><strong>Effects</strong></span>: Returns sub-expression <span class="emphasis"><em>sub</em></span>
         as a string: <code class="computeroutput"><span class="identifier">string_type</span><span class="special">((*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">])</span></code>.
       </p>
+<p>
+ The overloads that accept a string, return the string that matched the named
+ sub-expression <span class="emphasis"><em>n</em></span>. In the event that there is no such
+ named sub-expression then returns an empty string.
+ </p>
+<p>
+ 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: in this case the characters will be widened to the underlying
+ character type of the original regular expression. A compiler error will
+ occur if the argument passes a wider character type than the underlying sequence.
+ These overloads allow a normal narrow character C string literal to be used
+ as an argument, even when the underlying character type of the expression
+ being matched may be something more exotic such as a Unicode character type.
+ </p>
 <a name="boost_regex.match_results.subscript"></a><p>
       </p>
 <pre class="programlisting"><span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">char_type</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
+<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;&amp;</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
 </pre>
 <p>
         <span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
@@ -413,6 +506,22 @@
         then returns a <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
         object whose matched member is false.
       </p>
+<p>
+ The overloads that accept a string, return a reference to the <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object representing the
+ character sequence that matched the named sub-expression <span class="emphasis"><em>n</em></span>.
+ In the event that there is no such named sub-expression then returns a <a class="link" href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
+ object whose matched member is false.
+ </p>
+<p>
+ 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: in this case the characters will be widened to the underlying
+ character type of the original regular expression. A compiler error will
+ occur if the argument passes a wider character type than the underlying sequence.
+ These overloads allow a normal narrow character C string literal to be used
+ as an argument, even when the underlying character type of the expression
+ being matched may be something more exotic such as a Unicode character type.
+ </p>
 <a name="boost_regex.match_results.prefix"></a><p>
       </p>
 <pre class="programlisting"><span class="identifier">const_reference</span> <span class="identifier">prefix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Interfacing With Non-Standard String Types</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="regex_traits.html" title="regex_traits">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Working With Unicode and ICU String Types</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
 <link rel="prev" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/intro.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/intro.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/intro.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Introduction to using Regex with ICU</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
 <link rel="prev" href="../icu.html" title="Working With Unicode and ICU String Types">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Unicode Regular Expression Algorithms</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
 <link rel="prev" href="unicode_types.html" title="Unicode regular expression types">
@@ -43,7 +43,7 @@
             on to the "real" algorithm.
           </p>
 <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5>
-<a name="id643583"></a>
+<a name="id763376"></a>
             <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
           </h5>
 <p>
@@ -89,7 +89,7 @@
 <span class="special">}</span>
 </pre>
 <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5>
-<a name="id644302"></a>
+<a name="id763891"></a>
             <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
           </h5>
 <p>
@@ -128,7 +128,7 @@
 <span class="special">}</span>
 </pre>
 <a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5>
-<a name="id644896"></a>
+<a name="id765992"></a>
             <a class="link" href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
           </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Unicode Aware Regex Iterators</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
 <link rel="prev" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
@@ -28,7 +28,7 @@
           Unicode Aware Regex Iterators</a>
 </h5></div></div></div>
 <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5>
-<a name="id645356"></a>
+<a name="id766310"></a>
             <a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
           </h5>
 <p>
@@ -126,7 +126,7 @@
             Provided of course that the input is encoded as UTF-8.
           </p>
 <a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5>
-<a name="id647103"></a>
+<a name="id767579"></a>
             <a class="link" href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a>
           </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Unicode regular expression types</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
 <link rel="prev" href="intro.html" title="Introduction to using Regex with ICU">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Using Boost Regex With MFC Strings</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
 <link rel="prev" href="icu/unicode_iter.html" title="Unicode Aware Regex Iterators">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Overloaded Algorithms For MFC String Types</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
 <link rel="prev" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
@@ -34,7 +34,7 @@
             here they are anyway:
           </p>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5>
-<a name="id652259"></a>
+<a name="id772430"></a>
             <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a>
           </h5>
 <p>
@@ -82,7 +82,7 @@
 <span class="special">}</span>
 </pre>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5>
-<a name="id653171"></a>
+<a name="id773088"></a>
             <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match
             (second overload)</a>
           </h5>
@@ -110,7 +110,7 @@
 <span class="special">}</span>
 </pre>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
-<a name="id653763"></a>
+<a name="id775582"></a>
             <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a>
           </h5>
 <p>
@@ -149,7 +149,7 @@
 <span class="special">}</span>
 </pre>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5>
-<a name="id654500"></a>
+<a name="id776118"></a>
             <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search
             (second overload)</a>
           </h5>
@@ -164,7 +164,7 @@
             <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
           </p>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5>
-<a name="id654904"></a>
+<a name="id776408"></a>
             <a class="link" href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a>
           </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Introduction to Boost.Regex and MFC Strings</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
 <link rel="prev" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Iterating Over the Matches Within An MFC String</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
 <link rel="prev" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
@@ -32,7 +32,7 @@
             an MFC/ATL string to a <a class="link" href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a class="link" href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>:
           </p>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5>
-<a name="id655985"></a>
+<a name="id777178"></a>
             <a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator
             creation helper</a>
           </h5>
@@ -68,7 +68,7 @@
 <span class="special">}</span>
 </pre>
 <a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5>
-<a name="id656734"></a>
+<a name="id778820"></a>
             <a class="link" href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator
             creation helpers</a>
           </h5>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Regular Expression Creation From an MFC String</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
 <link rel="prev" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Regex Types Used With MFC Strings</title>
 <link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../../index.html" title="Boost.Regex">
 <link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
 <link rel="prev" href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/posix.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/posix.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/posix.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>POSIX Compatible C API's</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
@@ -165,7 +165,7 @@
 <a name="regcomp"></a><p>
       </p>
 <a name="boost_regex.ref.posix.regcomp"></a><h5>
-<a name="id659651"></a>
+<a name="id780958"></a>
         <a class="link" href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
       </h5>
 <p>
@@ -379,7 +379,7 @@
 <a name="regerror"></a><p>
       </p>
 <a name="boost_regex.ref.posix.regerror"></a><h5>
-<a name="id660295"></a>
+<a name="id781469"></a>
         <a class="link" href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
       </h5>
 <p>
@@ -467,7 +467,7 @@
 <a name="regexec"></a><p>
       </p>
 <a name="boost_regex.ref.posix.regexec"></a><h5>
-<a name="id660478"></a>
+<a name="id781598"></a>
         <a class="link" href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
       </h5>
 <p>
@@ -537,7 +537,7 @@
 <a name="regfree"></a><p>
       </p>
 <a name="boost_regex.ref.posix.regfree"></a><h5>
-<a name="id660619"></a>
+<a name="id781709"></a>
         <a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/regex_iterator.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/regex_iterator.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/regex_iterator.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_iterator</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="regex_replace.html" title="regex_replace">
@@ -78,7 +78,7 @@
                           <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.regex_iterator.description"></a><h5>
-<a name="id618047"></a>
+<a name="id739152"></a>
         <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
       </h5>
 <p>
@@ -436,7 +436,7 @@
         <span class="emphasis"><em>m</em></span>.
       </p>
 <a name="boost_regex.ref.regex_iterator.examples"></a><h5>
-<a name="id621180"></a>
+<a name="id742537"></a>
         <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/regex_match.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/regex_match.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/regex_match.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_match</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="sub_match.html" title="sub_match">
@@ -80,7 +80,7 @@
                  <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.regex_match.description"></a><h5>
-<a name="id601653"></a>
+<a name="id722544"></a>
         <a class="link" href="regex_match.html#boost_regex.ref.regex_match.description">Description</a>
       </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
@@ -360,7 +360,7 @@
         <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
       </p>
 <a name="boost_regex.ref.regex_match.examples"></a><h5>
-<a name="id604831"></a>
+<a name="id724914"></a>
         <a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/regex_replace.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/regex_replace.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/regex_replace.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_replace</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="regex_search.html" title="regex_search">
@@ -53,7 +53,7 @@
                                   <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.regex_replace.description"></a><h5>
-<a name="id612131"></a>
+<a name="id733770"></a>
         <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a>
       </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">&gt;</span>
@@ -163,7 +163,7 @@
         and then returns <code class="computeroutput"><span class="identifier">result</span></code>.
       </p>
 <a name="boost_regex.ref.regex_replace.examples"></a><h5>
-<a name="id613680"></a>
+<a name="id734884"></a>
         <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/regex_search.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/regex_search.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/regex_search.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_search</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="regex_match.html" title="regex_match">
@@ -73,7 +73,7 @@
                   <span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.regex_search.description"></a><h5>
-<a name="id607041"></a>
+<a name="id726538"></a>
         <a class="link" href="regex_search.html#boost_regex.ref.regex_search.description">Description</a>
       </h5>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">&gt;</span>
@@ -355,7 +355,7 @@
         <span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
       </p>
 <a name="boost_regex.ref.regex_search.examples"></a><h5>
-<a name="id610306"></a>
+<a name="id731156"></a>
         <a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_token_iterator</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="regex_iterator.html" title="regex_iterator">
@@ -136,7 +136,7 @@
          <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.regex_token_iterator.description"></a><h5>
-<a name="id626987"></a>
+<a name="id748992"></a>
         <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a>
       </h5>
 <a name="boost_regex.regex_token_iterator.construct1"></a><p>
@@ -383,7 +383,7 @@
         <span class="emphasis"><em>m</em></span>.
       </p>
 <a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
-<a name="id631204"></a>
+<a name="id752056"></a>
         <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/regex_traits.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/regex_traits.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/regex_traits.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>regex_traits</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="error_type.html" title="error_type">
@@ -46,7 +46,7 @@
 <span class="special">}</span> <span class="comment">// namespace boost
 </span></pre>
 <a name="boost_regex.ref.regex_traits.description"></a><h5>
-<a name="id641830"></a>
+<a name="id762181"></a>
         <a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
       </h5>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/sub_match.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/sub_match.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/sub_match.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>sub_match</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="match_results.html" title="match_results">
@@ -329,11 +329,11 @@
 <span class="special">}</span> <span class="comment">// namespace boost
 </span></pre>
 <a name="boost_regex.ref.sub_match.description"></a><h5>
-<a name="id586170"></a>
+<a name="id706400"></a>
         <a class="link" href="sub_match.html#boost_regex.ref.sub_match.description">Description</a>
       </h5>
 <a name="boost_regex.ref.sub_match.members"></a><h6>
-<a name="id586194"></a>
+<a name="id706413"></a>
         <a class="link" href="sub_match.html#boost_regex.ref.sub_match.members">Members</a>
       </h6>
 <a name="boost_regex.sub_match.value_type"></a><p>
@@ -473,7 +473,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.ref.sub_match.sub_match_non_member_operators"></a><h6>
-<a name="id587769"></a>
+<a name="id707514"></a>
         <a class="link" href="sub_match.html#boost_regex.ref.sub_match.sub_match_non_member_operators">sub_match
         non-member operators</a>
       </h6>
@@ -1008,7 +1008,7 @@
         <span class="special">+</span> <span class="identifier">m2</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>.
       </p>
 <a name="boost_regex.ref.sub_match.stream_inserter"></a><h6>
-<a name="id599741"></a>
+<a name="id719507"></a>
         <a class="link" href="sub_match.html#boost_regex.ref.sub_match.stream_inserter">Stream inserter</a>
       </h6>
 <a name="boost_regex.sub_match.op_stream"></a><p>

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>syntax_option_type</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../ref.html" title="Reference">
 <link rel="prev" href="bad_expression.html" title="bad_expression">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Options for POSIX Basic Regular Expressions</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
 <link rel="prev" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Options for POSIX Extended Regular Expressions</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
 <link rel="prev" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Options for Literal Strings</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
 <link rel="prev" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Overview of syntax_option_type</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
 <link rel="prev" href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Options for Perl Regular Expressions</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
 <link rel="prev" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">

Modified: branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>syntax_option_type Synopsis</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
 <link rel="prev" href="../syntax_option_type.html" title="syntax_option_type">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Regular Expression Syntax</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="partial_matches.html" title="Partial Matches">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/basic_extended.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/basic_extended.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/basic_extended.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>POSIX Extended Regular Expression Syntax</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
 <link rel="prev" href="perl_syntax.html" title="Perl Regular Expression Syntax">
@@ -28,7 +28,7 @@
       Expression Syntax</a>
 </h3></div></div></div>
 <a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
-<a name="id541641"></a>
+<a name="id659360"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
       </h4>
 <p>
@@ -46,7 +46,7 @@
 <a name="boost_regex.posix_extended_syntax"></a><p>
       </p>
 <a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4>
-<a name="id541905"></a>
+<a name="id659539"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
         Extended Syntax</a>
       </h4>
@@ -56,7 +56,7 @@
       </p>
 <pre class="programlisting">.[{()\*+?|^$</pre>
 <a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5>
-<a name="id541945"></a>
+<a name="id659560"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
       </h5>
 <p>
@@ -74,7 +74,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.syntax.basic_extended.anchors_"></a><h5>
-<a name="id542013"></a>
+<a name="id659605"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
       </h5>
 <p>
@@ -86,7 +86,7 @@
         of an expression, or the last character of a sub-expression.
       </p>
 <a name="boost_regex.syntax.basic_extended.marked_sub_expressions_"></a><h5>
-<a name="id542049"></a>
+<a name="id659627"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
         sub-expressions:</a>
       </h5>
@@ -98,7 +98,7 @@
         to by a back-reference.
       </p>
 <a name="boost_regex.syntax.basic_extended.repeats_"></a><h5>
-<a name="id542105"></a>
+<a name="id659661"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
       </h5>
 <p>
@@ -184,7 +184,7 @@
         operator to be applied to.
       </p>
 <a name="boost_regex.syntax.basic_extended.back_references_"></a><h5>
-<a name="id542553"></a>
+<a name="id659967"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
       </h5>
 <p>
@@ -214,7 +214,7 @@
         </p></td></tr>
 </table></div>
 <a name="boost_regex.syntax.basic_extended.alternation"></a><h5>
-<a name="id542647"></a>
+<a name="id660031"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
       </h5>
 <p>
@@ -227,7 +227,7 @@
         will match either of "abd" or "abef".
       </p>
 <a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5>
-<a name="id542750"></a>
+<a name="id660098"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
         sets:</a>
       </h5>
@@ -240,7 +240,7 @@
         A bracket expression may contain any combination of the following:
       </p>
 <a name="boost_regex.syntax.basic_extended.single_characters_"></a><h6>
-<a name="id542786"></a>
+<a name="id660118"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
         characters:</a>
       </h6>
@@ -249,7 +249,7 @@
         or 'c'.
       </p>
 <a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6>
-<a name="id542837"></a>
+<a name="id660149"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
         ranges:</a>
       </h6>
@@ -265,7 +265,7 @@
         the code points of the characters only.
       </p>
 <a name="boost_regex.syntax.basic_extended.negation_"></a><h6>
-<a name="id542938"></a>
+<a name="id660211"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
       </h6>
 <p>
@@ -274,7 +274,7 @@
         range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>.
       </p>
 <a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6>
-<a name="id543020"></a>
+<a name="id660265"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
         classes:</a>
       </h6>
@@ -284,7 +284,7 @@
         <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
       </p>
 <a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6>
-<a name="id543103"></a>
+<a name="id660316"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
         Elements:</a>
       </h6>
@@ -312,7 +312,7 @@
         matches a NUL character.
       </p>
 <a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6>
-<a name="id543264"></a>
+<a name="id660418"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
         classes:</a>
       </h6>
@@ -329,7 +329,7 @@
         or even all locales on one platform.
       </p>
 <a name="boost_regex.syntax.basic_extended.combinations_"></a><h6>
-<a name="id543369"></a>
+<a name="id660476"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
       </h6>
 <p>
@@ -337,7 +337,7 @@
         <code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]]</span></code>.
       </p>
 <a name="boost_regex.syntax.basic_extended.escapes"></a><h5>
-<a name="id543448"></a>
+<a name="id660529"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
       </h5>
 <p>
@@ -363,7 +363,7 @@
         extensions are also supported by Boost.Regex:
       </p>
 <a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6>
-<a name="id543518"></a>
+<a name="id660572"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes
         matching a specific character</a>
       </h6>
@@ -552,7 +552,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6>
-<a name="id543866"></a>
+<a name="id661216"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single
         character" character classes:</a>
       </h6>
@@ -706,7 +706,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.basic_extended.character_properties"></a><h6>
-<a name="id544497"></a>
+<a name="id661704"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
         Properties</a>
       </h6>
@@ -813,7 +813,7 @@
         matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>.
       </p>
 <a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6>
-<a name="id544898"></a>
+<a name="id662011"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
       </h6>
 <p>
@@ -888,7 +888,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6>
-<a name="id545091"></a>
+<a name="id662167"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
         boundaries</a>
       </h6>
@@ -979,7 +979,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6>
-<a name="id545326"></a>
+<a name="id662352"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
         Escape</a>
       </h6>
@@ -991,7 +991,7 @@
         match to start where the last one ended.
       </p>
 <a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6>
-<a name="id545376"></a>
+<a name="id662380"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
         escape</a>
       </h6>
@@ -1005,7 +1005,7 @@
 <span class="special">\*+</span><span class="identifier">aaa</span>
 </pre>
 <a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6>
-<a name="id545499"></a>
+<a name="id662460"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
         escapes</a>
       </h6>
@@ -1056,7 +1056,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6>
-<a name="id545632"></a>
+<a name="id662562"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
         escape</a>
       </h6>
@@ -1065,7 +1065,7 @@
         \@ matches a literal '@'.
       </p>
 <a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5>
-<a name="id545662"></a>
+<a name="id662579"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
         precedence</a>
       </h5>
@@ -1101,7 +1101,7 @@
 </li>
 </ol></div>
 <a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5>
-<a name="id545852"></a>
+<a name="id662712"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
         Gets Matched</a>
       </h5>
@@ -1111,11 +1111,11 @@
         rule</a>.
       </p>
 <a name="boost_regex.syntax.basic_extended.variations"></a><h4>
-<a name="id545892"></a>
+<a name="id662734"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a>
       </h4>
 <a name="boost_regex.syntax.basic_extended.egrep"></a><h5>
-<a name="id545915"></a>
+<a name="id662747"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
       </h5>
 <p>
@@ -1136,7 +1136,7 @@
         used with the -E option.
       </p>
 <a name="boost_regex.syntax.basic_extended.awk"></a><h5>
-<a name="id546073"></a>
+<a name="id662849"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
       </h5>
 <p>
@@ -1150,7 +1150,7 @@
         these by default anyway.
       </p>
 <a name="boost_regex.syntax.basic_extended.options"></a><h4>
-<a name="id546119"></a>
+<a name="id662874"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
       </h4>
 <p>
@@ -1163,7 +1163,7 @@
         modify how the case and locale sensitivity are to be applied.
       </p>
 <a name="boost_regex.syntax.basic_extended.references"></a><h4>
-<a name="id546248"></a>
+<a name="id662952"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
       </h4>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>POSIX Basic Regular Expression Syntax</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
 <link rel="prev" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax">
@@ -28,7 +28,7 @@
       Expression Syntax</a>
 </h3></div></div></div>
 <a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
-<a name="id546330"></a>
+<a name="id663001"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
       </h4>
 <p>
@@ -45,7 +45,7 @@
 <a name="boost_regex.posix_basic"></a><p>
       </p>
 <a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
-<a name="id546622"></a>
+<a name="id664085"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
         Basic Syntax</a>
       </h4>
@@ -55,7 +55,7 @@
       </p>
 <pre class="programlisting">.[\*^$</pre>
 <a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
-<a name="id546661"></a>
+<a name="id664106"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
       </h5>
 <p>
@@ -73,7 +73,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
-<a name="id546729"></a>
+<a name="id664151"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
       </h5>
 <p>
@@ -85,7 +85,7 @@
         of an expression, or the last character of a sub-expression.
       </p>
 <a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
-<a name="id546766"></a>
+<a name="id664171"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
         sub-expressions:</a>
       </h5>
@@ -97,7 +97,7 @@
         by a back-reference.
       </p>
 <a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
-<a name="id546822"></a>
+<a name="id664202"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
       </h5>
 <p>
@@ -155,7 +155,7 @@
         to.
       </p>
 <a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
-<a name="id547066"></a>
+<a name="id664367"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
       </h5>
 <p>
@@ -173,7 +173,7 @@
       </p>
 <pre class="programlisting">aaabba</pre>
 <a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
-<a name="id547141"></a>
+<a name="id664416"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
         sets:</a>
       </h5>
@@ -186,7 +186,7 @@
         A bracket expression may contain any combination of the following:
       </p>
 <a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
-<a name="id547177"></a>
+<a name="id664436"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
         characters:</a>
       </h6>
@@ -195,7 +195,7 @@
         or 'c'.
       </p>
 <a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
-<a name="id547227"></a>
+<a name="id664468"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
         ranges:</a>
       </h6>
@@ -211,7 +211,7 @@
         of the characters only.
       </p>
 <a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
-<a name="id547319"></a>
+<a name="id664524"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
       </h6>
 <p>
@@ -220,7 +220,7 @@
         range a-c.
       </p>
 <a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
-<a name="id547380"></a>
+<a name="id664562"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
         classes:</a>
       </h6>
@@ -230,7 +230,7 @@
         <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
       </p>
 <a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
-<a name="id547463"></a>
+<a name="id664614"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
         Elements:</a>
       </h6>
@@ -259,7 +259,7 @@
         element names</a>.
       </p>
 <a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
-<a name="id547611"></a>
+<a name="id664705"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
         classes:</a>
       </h6>
@@ -276,7 +276,7 @@
         or even all locales on one platform.
       </p>
 <a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
-<a name="id547716"></a>
+<a name="id664763"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
       </h6>
 <p>
@@ -284,7 +284,7 @@
         <code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></code>
       </p>
 <a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
-<a name="id547794"></a>
+<a name="id664816"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
       </h5>
 <p>
@@ -299,7 +299,7 @@
         will match either a literal '\' or a '^'.
       </p>
 <a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
-<a name="id547851"></a>
+<a name="id664849"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
         Matched</a>
       </h4>
@@ -309,13 +309,13 @@
         rule</a>.
       </p>
 <a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
-<a name="id547890"></a>
+<a name="id664871"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
       </h4>
 <a name="boost_regex.grep_syntax"></a><p>
       </p>
 <a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
-<a name="id547923"></a>
+<a name="id664891"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
       </h5>
 <p>
@@ -333,7 +333,7 @@
         As its name suggests, this behavior is consistent with the Unix utility grep.
       </p>
 <a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
-<a name="id548067"></a>
+<a name="id664986"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
       </h5>
 <p>
@@ -613,7 +613,7 @@
         leftmost-longest rule</a>.
       </p>
 <a name="boost_regex.syntax.basic_syntax.options"></a><h4>
-<a name="id548562"></a>
+<a name="id665404"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
       </h4>
 <p>
@@ -627,7 +627,7 @@
         options</a> modify how the case and locale sensitivity are to be applied.
       </p>
 <a name="boost_regex.syntax.basic_syntax.references"></a><h4>
-<a name="id548735"></a>
+<a name="id665510"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
       </h4>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Character Class Names</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
 <link rel="prev" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Character classes that are supported by Unicode Regular Expressions</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../character_classes.html" title="Character Class Names">
 <link rel="prev" href="std_char_clases.html" title="Character Classes that are Always Supported">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/std_char_clases.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/std_char_clases.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/character_classes/std_char_clases.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Character Classes that are Always Supported</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../character_classes.html" title="Character Class Names">
 <link rel="prev" href="../character_classes.html" title="Character Class Names">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Collating Names</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
 <link rel="prev" href="character_classes/optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/digraphs.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/digraphs.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/digraphs.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Digraphs</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../collating_names.html" title="Collating Names">
 <link rel="prev" href="../collating_names.html" title="Collating Names">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/named_unicode.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/named_unicode.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/named_unicode.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Named Unicode Characters</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../collating_names.html" title="Collating Names">
 <link rel="prev" href="posix_symbolic_names.html" title="POSIX Symbolic Names">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>POSIX Symbolic Names</title>
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../../index.html" title="Boost.Regex">
 <link rel="up" href="../collating_names.html" title="Collating Names">
 <link rel="prev" href="digraphs.html" title="Digraphs">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/leftmost_longest_rule.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/leftmost_longest_rule.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/leftmost_longest_rule.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>The Leftmost Longest Rule</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
 <link rel="prev" href="collating_names/named_unicode.html" title="Named Unicode Characters">

Modified: branches/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Perl Regular Expression Syntax</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../../index.html" title="Boost.Regex">
 <link rel="up" href="../syntax.html" title="Regular Expression Syntax">
 <link rel="prev" href="../syntax.html" title="Regular Expression Syntax">
@@ -28,15 +28,13 @@
       Syntax</a>
 </h3></div></div></div>
 <a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4>
-<a name="id535061"></a>
+<a name="id653383"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
       </h4>
 <p>
         The Perl regular expression syntax is based on that used by the programming
         language Perl . Perl regular expressions are the default behavior in Boost.Regex
- or you can pass the flag <code class="computeroutput"><span class="identifier">perl</span></code>
- to the <a class="link" href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
- constructor, for example:
+ or you can pass the flag <code class="literal">perl</code> to the <a class="link" href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> constructor, for example:
       </p>
 <pre class="programlisting"><span class="comment">// e1 is a case sensitive Perl regular expression:
 </span><span class="comment">// since Perl is the default option there's no need to explicitly specify the syntax used here:
@@ -45,7 +43,7 @@
 </span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">perl</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4>
-<a name="id535282"></a>
+<a name="id653530"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
         Regular Expression Syntax</a>
       </h4>
@@ -55,7 +53,7 @@
       </p>
 <pre class="programlisting">.[{()\*+?|^$</pre>
 <a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5>
-<a name="id535320"></a>
+<a name="id653554"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
       </h5>
 <p>
@@ -65,17 +63,17 @@
 <div class="itemizedlist"><ul type="disc">
 <li>
           The NULL character when the <a class="link" href="../ref/match_flag_type.html" title="match_flag_type">flag
- <code class="computeroutput"><span class="identifier">match_not_dot_null</span></code></a>
- is passed to the matching algorithms.
+ <code class="literal">match_not_dot_null</code></a> is passed to the matching
+ algorithms.
         </li>
 <li>
           The newline character when the <a class="link" href="../ref/match_flag_type.html" title="match_flag_type">flag
- <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code></a>
- is passed to the matching algorithms.
+ <code class="literal">match_not_dot_newline</code></a> is passed to the matching
+ algorithms.
         </li>
 </ul></div>
 <a name="boost_regex.syntax.perl_syntax.anchors"></a><h5>
-<a name="id535401"></a>
+<a name="id653601"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
       </h5>
 <p>
@@ -85,19 +83,18 @@
         A '$' character shall match the end of a line.
       </p>
 <a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5>
-<a name="id535435"></a>
+<a name="id653623"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
         sub-expressions</a>
       </h5>
 <p>
- A section beginning <code class="computeroutput"><span class="special">(</span></code> and ending
- <code class="computeroutput"><span class="special">)</span></code> acts as a marked sub-expression.
- Whatever matched the sub-expression is split out in a separate field by the
- matching algorithms. Marked sub-expressions can also repeated, or referred
- to by a back-reference.
+ A section beginning <code class="literal">(</code> and ending <code class="literal">)</code>
+ acts as a marked sub-expression. Whatever matched the sub-expression is split
+ out in a separate field by the matching algorithms. Marked sub-expressions
+ can also repeated, or referred to by a back-reference.
       </p>
 <a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5>
-<a name="id535490"></a>
+<a name="id653649"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
         grouping</a>
       </h5>
@@ -105,34 +102,32 @@
         A marked sub-expression is useful to lexically group part of a regular expression,
         but has the side-effect of spitting out an extra field in the result. As
         an alternative you can lexically group part of a regular expression, without
- generating a marked sub-expression by using <code class="computeroutput"><span class="special">(?:</span></code>
- and <code class="computeroutput"><span class="special">)</span></code> , for example <code class="computeroutput"><span class="special">(?:</span><span class="identifier">ab</span><span class="special">)+</span></code>
- will repeat <code class="computeroutput"><span class="identifier">ab</span></code> without splitting
- out any separate sub-expressions.
+ generating a marked sub-expression by using <code class="literal">(?:</code> and <code class="literal">)</code>
+ , for example <code class="literal">(?:ab)+</code> will repeat <code class="literal">ab</code>
+ without splitting out any separate sub-expressions.
       </p>
 <a name="boost_regex.syntax.perl_syntax.repeats"></a><h5>
-<a name="id535579"></a>
+<a name="id653685"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
       </h5>
 <p>
         Any atom (a single character, a marked sub-expression, or a character class)
- can be repeated with the <code class="computeroutput"><span class="special">*</span></code>,
- <code class="computeroutput"><span class="special">+</span></code>, <code class="computeroutput"><span class="special">?</span></code>,
- and <code class="computeroutput"><span class="special">{}</span></code> operators.
+ can be repeated with the <code class="literal">*</code>, <code class="literal">+</code>, <code class="literal">?</code>,
+ and <code class="literal">{}</code> operators.
       </p>
 <p>
- The <code class="computeroutput"><span class="special">*</span></code> operator will match the
- preceding atom zero or more times, for example the expression <code class="computeroutput"><span class="identifier">a</span><span class="special">*</span><span class="identifier">b</span></code>
- will match any of the following:
+ The <code class="literal">*</code> operator will match the preceding atom zero or more
+ times, for example the expression <code class="literal">a*b</code> will match any of
+ the following:
       </p>
 <pre class="programlisting"><span class="identifier">b</span>
 <span class="identifier">ab</span>
 <span class="identifier">aaaaaaaab</span>
 </pre>
 <p>
- The <code class="computeroutput"><span class="special">+</span></code> operator will match the
- preceding atom one or more times, for example the expression <code class="computeroutput"><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span></code>
- will match any of the following:
+ The <code class="literal">+</code> operator will match the preceding atom one or more
+ times, for example the expression <code class="literal">a+b</code> will match any of
+ the following:
       </p>
 <pre class="programlisting"><span class="identifier">ab</span>
 <span class="identifier">aaaaaaaab</span>
@@ -143,9 +138,8 @@
 <pre class="programlisting"><span class="identifier">b</span>
 </pre>
 <p>
- The <code class="computeroutput"><span class="special">?</span></code> operator will match the
- preceding atom zero or one times, for example the expression ca?b will match
- any of the following:
+ The <code class="literal">?</code> operator will match the preceding atom zero or one
+ times, for example the expression ca?b will match any of the following:
       </p>
 <pre class="programlisting"><span class="identifier">cb</span>
 <span class="identifier">cab</span>
@@ -159,16 +153,13 @@
         An atom can also be repeated with a bounded repeat:
       </p>
 <p>
- <code class="computeroutput"><span class="identifier">a</span><span class="special">{</span><span class="identifier">n</span><span class="special">}</span></code> Matches
- 'a' repeated exactly n times.
+ <code class="literal">a{n}</code> Matches 'a' repeated exactly n times.
       </p>
 <p>
- <code class="computeroutput"><span class="identifier">a</span><span class="special">{</span><span class="identifier">n</span><span class="special">,}</span></code> Matches
- 'a' repeated n or more times.
+ <code class="literal">a{n,}</code> Matches 'a' repeated n or more times.
       </p>
 <p>
- <code class="computeroutput"><span class="identifier">a</span><span class="special">{</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">}</span></code> Matches 'a' repeated between n and m times
- inclusive.
+ <code class="literal">a{n, m}</code> Matches 'a' repeated between n and m times inclusive.
       </p>
 <p>
         For example:
@@ -193,11 +184,11 @@
 <pre class="programlisting"><span class="identifier">a</span><span class="special">(*)</span>
 </pre>
 <p>
- Will raise an error, as there is nothing for the <code class="computeroutput"><span class="special">*</span></code>
- operator to be applied to.
+ Will raise an error, as there is nothing for the <code class="literal">*</code> operator
+ to be applied to.
       </p>
 <a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5>
-<a name="id536052"></a>
+<a name="id653922"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
         repeats</a>
       </h5>
@@ -207,28 +198,59 @@
         that will consume as little input as possible while still producing a match.
       </p>
 <p>
- <code class="computeroutput"><span class="special">*?</span></code> Matches the previous atom
- zero or more times, while consuming as little input as possible.
+ <code class="literal">*?</code> Matches the previous atom zero or more times, while
+ consuming as little input as possible.
       </p>
 <p>
- <code class="computeroutput"><span class="special">+?</span></code> Matches the previous atom
- one or more times, while consuming as little input as possible.
+ <code class="literal">+?</code> Matches the previous atom one or more times, while
+ consuming as little input as possible.
       </p>
 <p>
- <code class="computeroutput"><span class="special">??</span></code> Matches the previous atom
- zero or one times, while consuming as little input as possible.
+ <code class="literal">??</code> Matches the previous atom zero or one times, while
+ consuming as little input as possible.
       </p>
 <p>
- <code class="computeroutput"><span class="special">{</span><span class="identifier">n</span><span class="special">,}?</span></code> Matches the previous atom n or more times,
+ <code class="literal">{n,}?</code> Matches the previous atom n or more times, while
+ consuming as little input as possible.
+ </p>
+<p>
+ <code class="literal">{n,m}?</code> Matches the previous atom between n and m times,
         while consuming as little input as possible.
       </p>
+<a name="boost_regex.syntax.perl_syntax.pocessive_repeats"></a><h5>
+<a name="id653980"></a>
+ <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pocessive_repeats">Pocessive
+ repeats</a>
+ </h5>
+<p>
+ By default when a repeated patten does not match then the engine will backtrack
+ until a match is found. However, this behaviour can sometime be undesireable
+ so there are also "pocessive" repeats: these match as much as possible
+ and do not then allow backtracking if the rest of the expression fails to
+ match.
+ </p>
+<p>
+ <code class="literal">*+</code> Matches the previous atom zero or more times, while
+ giving nothing back.
+ </p>
+<p>
+ <code class="literal">++</code> Matches the previous atom one or more times, while
+ giving nothing back.
+ </p>
+<p>
+ <code class="literal">?+</code> Matches the previous atom zero or one times, while
+ giving nothing back.
+ </p>
 <p>
- <code class="computeroutput"><span class="special">{</span><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span><span class="special">}?</span></code>
- Matches the previous atom between n and m times, while consuming as little
- input as possible.
+ <code class="literal">{n,}+</code> Matches the previous atom n or more times, while
+ giving nothing back.
+ </p>
+<p>
+ <code class="literal">{n,m}+</code> Matches the previous atom between n and m times,
+ while giving nothing back.
       </p>
 <a name="boost_regex.syntax.perl_syntax.back_references"></a><h5>
-<a name="id536197"></a>
+<a name="id654039"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
       </h5>
 <p>
@@ -247,99 +269,187 @@
       </p>
 <pre class="programlisting"><span class="identifier">aaabba</span>
 </pre>
+<p>
+ You can also use the \g escape for the same function, for example:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Escape
+ </p>
+ </th>
+<th>
+ <p>
+ Meaning
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="literal">\g1</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match whatever matched sub-expression 1
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">\g{1}</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match whatever matched sub-expression 1: this form allows for safer
+ parsing of the expression in cases like <code class="literal">\g{1}2</code>
+ or for indexes higher than 9 as in <code class="literal">\g{1234}</code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">\g-1</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match whatever matched the last opened sub-expression
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">\g{-2}</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match whatever matched the last but one opened sub-expression
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal">\g{one}</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match whatever matched the sub-expression named "one"
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Finally the \k escape can be used to refer to named subexpressions, for example
+ <code class="literal">\k&lt;two&gt;</code> will match whatever matched the subexpression
+ named "two".
+ </p>
 <a name="boost_regex.syntax.perl_syntax.alternation"></a><h5>
-<a name="id536280"></a>
+<a name="id654259"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
       </h5>
 <p>
- The <code class="computeroutput"><span class="special">|</span></code> operator will match either
- of its arguments, so for example: <code class="computeroutput"><span class="identifier">abc</span><span class="special">|</span><span class="identifier">def</span></code> will
- match either "abc" or "def".
+ The <code class="literal">|</code> operator will match either of its arguments, so
+ for example: <code class="literal">abc|def</code> will match either "abc"
+ or "def".
       </p>
 <p>
- Parenthesis can be used to group alternations, for example: <code class="computeroutput"><span class="identifier">ab</span><span class="special">(</span><span class="identifier">d</span><span class="special">|</span><span class="identifier">ef</span><span class="special">)</span></code>
+ Parenthesis can be used to group alternations, for example: <code class="literal">ab(d|ef)</code>
         will match either of "abd" or "abef".
       </p>
 <p>
         Empty alternatives are not allowed (these are almost always a mistake), but
- if you really want an empty alternative use <code class="computeroutput"><span class="special">(?:)</span></code>
- as a placeholder, for example:
+ if you really want an empty alternative use <code class="literal">(?:)</code> as a
+ placeholder, for example:
       </p>
 <p>
- <code class="computeroutput"><span class="special">|</span><span class="identifier">abc</span></code>
- is not a valid expression, but
+ <code class="literal">|abc</code> is not a valid expression, but
       </p>
 <p>
- <code class="computeroutput"><span class="special">(?:)|</span><span class="identifier">abc</span></code>
- is and is equivalent, also the expression:
+ <code class="literal">(?:)|abc</code> is and is equivalent, also the expression:
       </p>
 <p>
- <code class="computeroutput"><span class="special">(?:</span><span class="identifier">abc</span><span class="special">)??</span></code> has exactly the same effect.
+ <code class="literal">(?:abc)??</code> has exactly the same effect.
       </p>
 <a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5>
-<a name="id536469"></a>
+<a name="id654327"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
       </h5>
 <p>
- A character set is a bracket-expression starting with <code class="computeroutput"><span class="special">[</span></code>
- and ending with <code class="computeroutput"><span class="special">]</span></code>, it defines
- a set of characters, and matches any single character that is a member of
- that set.
+ A character set is a bracket-expression starting with <code class="literal">[</code>
+ and ending with <code class="literal">]</code>, it defines a set of characters, and
+ matches any single character that is a member of that set.
       </p>
 <p>
         A bracket expression may contain any combination of the following:
       </p>
 <a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6>
-<a name="id536527"></a>
+<a name="id654632"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
       </h6>
 <p>
- For example <code class="computeroutput"><span class="special">[</span><span class="identifier">abc</span><span class="special">]</span></code>, will match any of the characters 'a', 'b',
- or 'c'.
+ For example <code class="literal">[abc]</code>, will match any of the characters 'a',
+ 'b', or 'c'.
       </p>
 <a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6>
-<a name="id536578"></a>
+<a name="id654654"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
         ranges</a>
       </h6>
 <p>
- For example <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></code>
- will match any single character in the range 'a' to 'c'. By default, for
- Perl regular expressions, a character x is within the range y to z, if the
- code point of the character lies within the codepoints of the endpoints of
- the range. Alternatively, if you set the <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> flag</a> when constructing the
- regular expression, then ranges are locale sensitive.
+ For example <code class="literal">[a-c]</code> will match any single character in the
+ range 'a' to 'c'. By default, for Perl regular expressions, a character x
+ is within the range y to z, if the code point of the character lies within
+ the codepoints of the endpoints of the range. Alternatively, if you set the
+ <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions"><code class="literal">collate</code>
+ flag</a> when constructing the regular expression, then ranges are locale
+ sensitive.
       </p>
 <a name="boost_regex.syntax.perl_syntax.negation"></a><h6>
-<a name="id536658"></a>
+<a name="id654686"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
       </h6>
 <p>
         If the bracket-expression begins with the ^ character, then it matches the
- complement of the characters it contains, for example <code class="computeroutput"><span class="special">[^</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></code> matches any character that is not in the
- range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>.
+ complement of the characters it contains, for example <code class="literal">[^a-c]</code>
+ matches any character that is not in the range <code class="literal">a-c</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6>
-<a name="id536740"></a>
+<a name="id654714"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
         classes</a>
       </h6>
 <p>
- An expression of the form <code class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></code>
- matches the named character class "name", for example <code class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></code> matches any lower case character. See
- <a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
+ An expression of the form <code class="literal">[[:name:]]</code> matches the named
+ character class "name", for example <code class="literal">[[:lower:]]</code>
+ matches any lower case character. See <a class="link" href="character_classes.html" title="Character Class Names">character
+ class names</a>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6>
-<a name="id536823"></a>
+<a name="id654746"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
         Elements</a>
       </h6>
 <p>
- An expression of the form <code class="computeroutput"><span class="special">[[.</span><span class="identifier">col</span><span class="special">.]</span></code> matches
- the collating element <span class="emphasis"><em>col</em></span>. A collating element is any
- single character, or any sequence of characters that collates as a single
- unit. Collating elements may also be used as the end point of a range, for
- example: <code class="computeroutput"><span class="special">[[.</span><span class="identifier">ae</span><span class="special">.]-</span><span class="identifier">c</span><span class="special">]</span></code>
+ An expression of the form <code class="literal">[[.col.]]</code> matches the collating
+ element <span class="emphasis"><em>col</em></span>. A collating element is any single character,
+ or any sequence of characters that collates as a single unit. Collating elements
+ may also be used as the end point of a range, for example: <code class="literal">[[.ae.]-c]</code>
         matches the character sequence "ae", plus any single character
         in the range "ae"-c, assuming that "ae" is treated as
         a single collating element in the current locale.
@@ -350,28 +460,27 @@
 <pre class="programlisting"><span class="special">[[.</span><span class="identifier">NUL</span><span class="special">.]]</span>
 </pre>
 <p>
- matches a <code class="computeroutput"><span class="special">\</span><span class="number">0</span></code>
- character.
+ matches a <code class="literal">\0</code> character.
       </p>
 <a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6>
-<a name="id536972"></a>
+<a name="id654808"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
         classes</a>
       </h6>
 <p>
- An expression of the form <code class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></code>,
- matches any character or collating element whose primary sort key is the
- same as that for collating element <span class="emphasis"><em>col</em></span>, as with collating
- elements the name <span class="emphasis"><em>col</em></span> may be a <a class="link" href="collating_names.html" title="Collating Names">symbolic
- name</a>. A primary sort key is one that ignores case, accentation, or
- locale-specific tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
+ An expression of the form <code class="literal">[[=col=]]</code>, matches any character
+ or collating element whose primary sort key is the same as that for collating
+ element <span class="emphasis"><em>col</em></span>, as with collating elements the name <span class="emphasis"><em>col</em></span>
+ may be a <a class="link" href="collating_names.html" title="Collating Names">symbolic name</a>.
+ A primary sort key is one that ignores case, accentation, or locale-specific
+ tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
         any of the characters: a, À, Á, Â, Ã, Ä, Å, A, à, á, â, ã, ä and å. Unfortunately implementation
         of this is reliant on the platform's collation and localisation support;
         this feature can not be relied upon to work portably across all platforms,
         or even all locales on one platform.
       </p>
 <a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6>
-<a name="id537075"></a>
+<a name="id654856"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
         Characters</a>
       </h6>
@@ -383,15 +492,15 @@
         is <span class="emphasis"><em>not</em></span> a "word" character.
       </p>
 <a name="boost_regex.syntax.perl_syntax.combinations"></a><h6>
-<a name="id537181"></a>
+<a name="id654925"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
       </h6>
 <p>
         All of the above can be combined in one character set declaration, for example:
- <code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]]</span></code>.
+ <code class="literal">[[:digit:]a-c[.NUL.]]</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.escapes"></a><h5>
-<a name="id537259"></a>
+<a name="id654946"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
       </h5>
 <p>
@@ -421,105 +530,103 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">a</span></code>
+ <code class="literal">\a</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">a</span></code>
+ <code class="literal">\a</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">e</span></code>
+ <code class="literal">\e</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="number">0x1B</span></code>
+ <code class="literal">0x1B</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">f</span></code>
+ <code class="literal">\f</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">f</span></code>
+ <code class="literal">\f</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>
+ <code class="literal">\n</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>
+ <code class="literal">\n</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">r</span></code>
+ <code class="literal">\r</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">r</span></code>
+ <code class="literal">\r</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">t</span></code>
+ <code class="literal">\t</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">t</span></code>
+ <code class="literal">\t</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">v</span>
- </code>
+ <code class="literal">\v</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">v</span></code>
+ <code class="literal">\v</code>
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">b</span></code>
+ <code class="literal">\b</code>
               </p>
               </td>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">b</span></code>
- (but only inside a character class declaration).
+ <code class="literal">\b</code> (but only inside a character class declaration).
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">cX</span></code>
+ <code class="literal">\cX</code>
               </p>
               </td>
 <td>
@@ -532,7 +639,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">xdd</span></code>
+ <code class="literal">\xdd</code>
               </p>
               </td>
 <td>
@@ -545,7 +652,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">x</span><span class="special">{</span><span class="identifier">dddd</span><span class="special">}</span></code>
+ <code class="literal">\x{dddd}</code>
               </p>
               </td>
 <td>
@@ -558,7 +665,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="number">0ddd</span></code>
+ <code class="literal">\0ddd</code>
               </p>
               </td>
 <td>
@@ -571,20 +678,21 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">N</span><span class="special">{</span><span class="identifier">name</span><span class="special">}</span></code>
+ <code class="literal">\N{name}</code>
               </p>
               </td>
 <td>
               <p>
                 Matches the single character which has the <a class="link" href="collating_names.html" title="Collating Names">symbolic
- name</a> <span class="emphasis"><em>name</em></span>. For example <code class="computeroutput"><span class="special">\</span><span class="identifier">N</span><span class="special">{</span><span class="identifier">newline</span><span class="special">}</span></code> matches the single character \n.
+ name</a> <span class="emphasis"><em>name</em></span>. For example <code class="literal">\N{newline}</code>
+ matches the single character \n.
               </p>
               </td>
 </tr>
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6>
-<a name="id537972"></a>
+<a name="id655334"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single
         character" character classes:</a>
       </h6>
@@ -678,6 +786,30 @@
 <tr>
 <td>
               <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">h</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Horizontal whitespace
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">v</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Vertical whitespace
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 <code class="computeroutput"><span class="special">\</span><span class="identifier">D</span></code>
               </p>
               </td>
@@ -735,10 +867,34 @@
               </p>
               </td>
 </tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">H</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Not Horizontal whitespace
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">V</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Not Vertical whitespace
+ </p>
+ </td>
+</tr>
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6>
-<a name="id538604"></a>
+<a name="id655934"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
         Properties</a>
       </h6>
@@ -842,33 +998,30 @@
 </tbody>
 </table></div>
 <p>
- For example <code class="computeroutput"><span class="special">\</span><span class="identifier">pd</span></code>
- matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>.
+ For example <code class="literal">\pd</code> matches any "digit" character,
+ as does <code class="literal">\p{digit}</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6>
-<a name="id539013"></a>
+<a name="id656223"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
       </h6>
 <p>
         The following escape sequences match the boundaries of words:
       </p>
 <p>
- <code class="computeroutput"><span class="special">\&lt;</span></code> Matches the start of a
- word.
+ <code class="literal">\&lt;</code> Matches the start of a word.
       </p>
 <p>
- <code class="computeroutput"><span class="special">\&gt;</span></code> Matches the end of a word.
+ <code class="literal">\&gt;</code> Matches the end of a word.
       </p>
 <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">b</span></code>
- Matches a word boundary (the start or end of a word).
+ <code class="literal">\b</code> Matches a word boundary (the start or end of a word).
       </p>
 <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">B</span></code>
- Matches only when not at a word boundary.
+ <code class="literal">\B</code> Matches only when not at a word boundary.
       </p>
 <a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6>
-<a name="id539115"></a>
+<a name="id656275"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
       </h6>
 <p>
@@ -890,46 +1043,69 @@
       </p>
 <p>
         \Z Matches an optional sequence of newlines at the end of a buffer: equivalent
- to the regular expression <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span><span class="special">*\</span><span class="identifier">z</span></code>
+ to the regular expression <code class="literal">\n*\z</code>
       </p>
 <a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6>
-<a name="id539198"></a>
+<a name="id656316"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
         Escape</a>
       </h6>
 <p>
- The sequence <code class="computeroutput"><span class="special">\</span><span class="identifier">G</span></code>
- matches only at the end of the last match found, or at the start of the text
- being matched if no previous match was found. This escape useful if you're
- iterating over the matches contained within a text, and you want each subsequence
- match to start where the last one ended.
+ The sequence <code class="literal">\G</code> matches only at the end of the last match
+ found, or at the start of the text being matched if no previous match was
+ found. This escape useful if you're iterating over the matches contained
+ within a text, and you want each subsequence match to start where the last
+ one ended.
       </p>
 <a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6>
-<a name="id539248"></a>
+<a name="id656337"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
       </h6>
 <p>
- The escape sequence <code class="computeroutput"><span class="special">\</span><span class="identifier">Q</span></code>
- begins a "quoted sequence": all the subsequent characters are treated
- as literals, until either the end of the regular expression or \E is found.
- For example the expression: <code class="computeroutput"><span class="special">\</span><span class="identifier">Q</span><span class="special">\*+\</span><span class="identifier">Ea</span><span class="special">+</span></code> would match either of:
+ The escape sequence <code class="literal">\Q</code> begins a "quoted sequence":
+ all the subsequent characters are treated as literals, until either the end
+ of the regular expression or \E is found. For example the expression: <code class="literal">\Q\*+\Ea+</code>
+ would match either of:
       </p>
 <pre class="programlisting"><span class="special">\*+</span><span class="identifier">a</span>
 <span class="special">\*+</span><span class="identifier">aaa</span>
 </pre>
 <a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6>
-<a name="id539354"></a>
+<a name="id656384"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">C</span></code>
- Matches a single code point: in Boost regex this has exactly the same effect
- as a "." operator. <code class="computeroutput"><span class="special">\</span><span class="identifier">X</span></code> Matches a combining character sequence:
- that is any non-combining character followed by a sequence of zero or more
- combining characters.
+ <code class="literal">\C</code> Matches a single code point: in Boost regex this has
+ exactly the same effect as a "." operator. <code class="literal">\X</code>
+ Matches a combining character sequence: that is any non-combining character
+ followed by a sequence of zero or more combining characters.
+ </p>
+<a name="boost_regex.syntax.perl_syntax.matching_line_endings"></a><h6>
+<a name="id656410"></a>
+ <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching
+ Line Endings</a>
+ </h6>
+<p>
+ The escape sequence <code class="literal">\R</code> matches any line ending character
+ sequence, specifically it is identical to the expression <code class="literal">(?&gt;\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}])</code>.
+ </p>
+<a name="boost_regex.syntax.perl_syntax.keeping_back_some_text"></a><h6>
+<a name="id656437"></a>
+ <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping
+ back some text</a>
+ </h6>
+<p>
+ <code class="literal">\K</code> Resets the start location of $0 to the current text
+ position: in other words everything to the left of \K is "kept back"
+ and does not form part of the regular expression match. $` is updated accordingly.
+ </p>
+<p>
+ For example <code class="literal">foo\Kbar</code> matched against the text "foobar"
+ would return the match "bar" for $0 and "foo" for $`.
+ This can be used to simulate variable width lookbehind assertions.
       </p>
 <a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6>
-<a name="id539418"></a>
+<a name="id656467"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
         escape</a>
       </h6>
@@ -938,57 +1114,98 @@
         \@ matches a literal '@'.
       </p>
 <a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5>
-<a name="id539447"></a>
+<a name="id656484"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
         Extended Patterns</a>
       </h5>
 <p>
         Perl-specific extensions to the regular expression syntax all start with
- <code class="computeroutput"><span class="special">(?</span></code>.
+ <code class="literal">(?</code>.
+ </p>
+<a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6>
+<a name="id656505"></a>
+ <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named
+ Subexpressions</a>
+ </h6>
+<p>
+ You can create a named subexpression using:
+ </p>
+<pre class="programlisting"><span class="special">(?&lt;</span><span class="identifier">NAME</span><span class="special">&gt;</span><span class="identifier">expression</span><span class="special">)</span>
+</pre>
+<p>
+ Which can be then be refered to by the name <span class="emphasis"><em>NAME</em></span>. Alternatively
+ you can delimit the name using 'NAME' as in:
+ </p>
+<pre class="programlisting"><span class="special">(?</span><span class="char">'NAME'</span><span class="identifier">expression</span><span class="special">)</span>
+</pre>
+<p>
+ These named subexpressions can be refered to in a backreference using either
+ <code class="literal">\g{NAME}</code> or <code class="literal">\k&lt;NAME&gt;</code> and can
+ also be refered to by name in a <a class="link" href="../format/perl_format.html" title="Perl Format String Syntax">Perl</a>
+ format string for search and replace operations, or in the <a class="link" href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> member functions.
       </p>
 <a name="boost_regex.syntax.perl_syntax.comments"></a><h6>
-<a name="id539489"></a>
+<a name="id656600"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?</span># <span class="special">...</span>
- <span class="special">)</span></code> is treated as a comment, it's contents
- are ignored.
+ <code class="literal">(?# ... )</code> is treated as a comment, it's contents are ignored.
       </p>
 <a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6>
-<a name="id539542"></a>
+<a name="id656623"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?</span><span class="identifier">imsx</span><span class="special">-</span><span class="identifier">imsx</span> <span class="special">...</span> <span class="special">)</span></code> alters
- which of the perl modifiers are in effect within the pattern, changes take
- effect from the point that the block is first seen and extend to any enclosing
- <code class="computeroutput"><span class="special">)</span></code>. Letters before a '-' turn
- that perl modifier on, letters afterward, turn it off.
+ <code class="literal">(?imsx-imsx ... )</code> alters which of the perl modifiers are
+ in effect within the pattern, changes take effect from the point that the
+ block is first seen and extend to any enclosing <code class="literal">)</code>. Letters
+ before a '-' turn that perl modifier on, letters afterward, turn it off.
       </p>
 <p>
- <code class="computeroutput"><span class="special">(?</span><span class="identifier">imsx</span><span class="special">-</span><span class="identifier">imsx</span><span class="special">:</span><span class="identifier">pattern</span><span class="special">)</span></code>
- applies the specified modifiers to pattern only.
+ <code class="literal">(?imsx-imsx:pattern)</code> applies the specified modifiers to
+ pattern only.
       </p>
 <a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6>
-<a name="id539669"></a>
+<a name="id656658"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
         groups</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?:</span><span class="identifier">pattern</span><span class="special">)</span></code> lexically groups pattern, without generating
+ <code class="literal">(?:pattern)</code> lexically groups pattern, without generating
         an additional sub-expression.
       </p>
+<a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6>
+<a name="id656679"></a>
+ <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a>
+ </h6>
+<p>
+ <code class="literal">(?|pattern)</code> resets the subexpression count at the start
+ of each "|" alternative within <span class="emphasis"><em>pattern</em></span>.
+ </p>
+<p>
+ The sub-expression count following this construct is that of whichever branch
+ had the largest number of sub-expressions. This construct is useful when
+ you want to capture one of a number of alternative matches in a single sub-expression
+ index.
+ </p>
+<p>
+ In the following example the index of each sub-expression is shown below
+ the expression:
+ </p>
+<pre class="programlisting"># before ---------------branch-reset----------- after
+/ ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
+# 1 2 2 3 2 3 4
+</pre>
 <a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6>
-<a name="id539720"></a>
+<a name="id656716"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?=</span><span class="identifier">pattern</span><span class="special">)</span></code> consumes zero characters, only if pattern
+ <code class="literal">(?=pattern)</code> consumes zero characters, only if pattern
         matches.
       </p>
 <p>
- <code class="computeroutput"><span class="special">(?!</span><span class="identifier">pattern</span><span class="special">)</span></code> consumes zero characters, only if pattern
+ <code class="literal">(?!pattern)</code> consumes zero characters, only if pattern
         does not match.
       </p>
 <p>
@@ -1003,54 +1220,106 @@
         could be used to validate the password.
       </p>
 <a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6>
-<a name="id539861"></a>
+<a name="id656791"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?&lt;=</span><span class="identifier">pattern</span><span class="special">)</span></code> consumes zero characters, only if pattern
+ <code class="literal">(?&lt;=pattern)</code> consumes zero characters, only if pattern
         could be matched against the characters preceding the current position (pattern
         must be of fixed length).
       </p>
 <p>
- <code class="computeroutput"><span class="special">(?&lt;!</span><span class="identifier">pattern</span><span class="special">)</span></code> consumes zero characters, only if pattern
+ <code class="literal">(?&lt;!pattern)</code> consumes zero characters, only if pattern
         could not be matched against the characters preceding the current position
         (pattern must be of fixed length).
       </p>
 <a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6>
-<a name="id539939"></a>
+<a name="id658462"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
         sub-expressions</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?&gt;</span><span class="identifier">pattern</span><span class="special">)</span></code> <span class="emphasis"><em>pattern</em></span> is matched
+ <code class="literal">(?&gt;pattern)</code> <span class="emphasis"><em>pattern</em></span> is matched
         independently of the surrounding patterns, the expression will never backtrack
         into <span class="emphasis"><em>pattern</em></span>. Independent sub-expressions are typically
         used to improve performance; only the best possible match for pattern will
         be considered, if this doesn't allow the expression as a whole to match then
         no match is found at all.
       </p>
+<a name="boost_regex.syntax.perl_syntax.recursive_expressions"></a><h6>
+<a name="id658493"></a>
+ <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions">Recursive
+ Expressions</a>
+ </h6>
+<p>
+ <code class="literal">(?<span class="emphasis"><em>N</em></span>) (?-<span class="emphasis"><em>N</em></span>) (?+<span class="emphasis"><em>N</em></span>)
+ (?R) (?0)</code>
+ </p>
+<p>
+ <code class="literal">(?R)</code> and <code class="literal">(?0)</code> recurse to the start
+ of the entire pattern.
+ </p>
+<p>
+ <code class="literal">(?<span class="emphasis"><em>N</em></span>)</code> executes sub-expression <span class="emphasis"><em>N</em></span>
+ recursively, for example <code class="literal">(?2)</code> will recurse to sub-expression
+ 2.
+ </p>
+<p>
+ <code class="literal">(?-<span class="emphasis"><em>N</em></span>)</code> and <code class="literal">(?+<span class="emphasis"><em>N</em></span>)</code>
+ are relative recursions, so for example <code class="literal">(?-1)</code> recurses
+ to the last sub-expression to be declared, and <code class="literal">(?+1)</code> recurses
+ to the next sub-expression to be declared.
+ </p>
 <a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6>
-<a name="id540003"></a>
+<a name="id658591"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
         Expressions</a>
       </h6>
 <p>
- <code class="computeroutput"><span class="special">(?(</span><span class="identifier">condition</span><span class="special">)</span><span class="identifier">yes</span><span class="special">-</span><span class="identifier">pattern</span><span class="special">|</span><span class="identifier">no</span><span class="special">-</span><span class="identifier">pattern</span><span class="special">)</span></code> attempts to match <span class="emphasis"><em>yes-pattern</em></span>
- if the <span class="emphasis"><em>condition</em></span> is true, otherwise attempts to match
- <span class="emphasis"><em>no-pattern</em></span>.
+ <code class="literal">(?(condition)yes-pattern|no-pattern)</code> attempts to match
+ <span class="emphasis"><em>yes-pattern</em></span> if the <span class="emphasis"><em>condition</em></span> is
+ true, otherwise attempts to match <span class="emphasis"><em>no-pattern</em></span>.
       </p>
 <p>
- <code class="computeroutput"><span class="special">(?(</span><span class="identifier">condition</span><span class="special">)</span><span class="identifier">yes</span><span class="special">-</span><span class="identifier">pattern</span><span class="special">)</span></code>
- attempts to match <span class="emphasis"><em>yes-pattern</em></span> if the <span class="emphasis"><em>condition</em></span>
- is true, otherwise fails.
+ <code class="literal">(?(condition)yes-pattern)</code> attempts to match <span class="emphasis"><em>yes-pattern</em></span>
+ if the <span class="emphasis"><em>condition</em></span> is true, otherwise fails.
       </p>
 <p>
- <span class="emphasis"><em>condition</em></span> may be either a forward lookahead assert,
- or the index of a marked sub-expression (the condition becomes true if the
- sub-expression has been matched).
+ <span class="emphasis"><em>condition</em></span> may be either: a forward lookahead assert,
+ the index of a marked sub-expression (the condition becomes true if the sub-expression
+ has been matched), or an index of a recursion (the condition become true
+ if we are executing directly inside the specified recursion).
       </p>
+<p>
+ Here is a summary of the possible predicates:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="literal">(?(?=assert)yes-pattern|no-pattern)</code> Executes <span class="emphasis"><em>yes-pattern</em></span>
+ if the forward look-ahead assert matches, otherwise executes <span class="emphasis"><em>no-pattern</em></span>.
+ </li>
+<li>
+<code class="literal">(?(?!assert)yes-pattern|no-pattern)</code> Executes <span class="emphasis"><em>yes-pattern</em></span>
+ if the forward look-ahead assert does not match, otherwise executes <span class="emphasis"><em>no-pattern</em></span>.
+ </li>
+<li>
+<code class="literal">(?(R)yes-pattern|no-pattern)</code> Executes <span class="emphasis"><em>yes-pattern</em></span>
+ if we are executing inside a recursion, otherwise executes <span class="emphasis"><em>no-pattern</em></span>.
+ </li>
+<li>
+<code class="literal">(?(R<span class="emphasis"><em>N</em></span>)yes-pattern|no-pattern)</code> Executes
+ <span class="emphasis"><em>yes-pattern</em></span> if we are executing inside a recursion
+ to sub-expression <span class="emphasis"><em>N</em></span>, otherwise executes <span class="emphasis"><em>no-pattern</em></span>.
+ </li>
+<li>
+<code class="literal">(?(DEFINE)never-exectuted-pattern)</code> Defines a block of
+ code that is never executed and matches no characters: this is usually
+ used to define one or more named sub-expressions which are refered to from
+ elsewhere in the pattern.
+ </li>
+</ul></div>
 <a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5>
-<a name="id540172"></a>
+<a name="id658732"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
         precedence</a>
       </h5>
@@ -1063,17 +1332,16 @@
           <span class="special">[::]</span> <span class="special">[..]</span></code>
 </li>
 <li>
- Escaped characters <code class="computeroutput"><span class="special">\</span></code>
+ Escaped characters <code class="literal">\</code>
 </li>
 <li>
           Character set (bracket expression) <code class="computeroutput"><span class="special">[]</span></code>
 </li>
 <li>
- Grouping <code class="computeroutput"><span class="special">()</span></code>
+ Grouping <code class="literal">()</code>
 </li>
 <li>
- Single-character-ERE duplication <code class="computeroutput"><span class="special">*</span>
- <span class="special">+</span> <span class="special">?</span> <span class="special">{</span><span class="identifier">m</span><span class="special">,</span><span class="identifier">n</span><span class="special">}</span></code>
+ Single-character-ERE duplication <code class="literal">* + ? {m,n}</code>
 </li>
 <li>
           Concatenation
@@ -1086,7 +1354,7 @@
         </li>
 </ol></div>
 <a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4>
-<a name="id540350"></a>
+<a name="id658822"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
         matched</a>
       </h4>
@@ -1123,7 +1391,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">AtomA</span> <span class="identifier">AtomB</span></code>
+ <code class="literal">AtomA AtomB</code>
               </p>
               </td>
 <td>
@@ -1136,8 +1404,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">Expression1</span> <span class="special">|</span>
- <span class="identifier">Expression2</span></code>
+ <code class="literal">Expression1 | Expression2</code>
               </p>
               </td>
 <td>
@@ -1150,7 +1417,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="identifier">N</span><span class="special">}</span></code>
+ <code class="literal">S{N}</code>
               </p>
               </td>
 <td>
@@ -1162,7 +1429,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="identifier">N</span><span class="special">,</span><span class="identifier">M</span><span class="special">}</span></code>
+ <code class="literal">S{N,M}</code>
               </p>
               </td>
 <td>
@@ -1174,7 +1441,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="identifier">N</span><span class="special">,</span><span class="identifier">M</span><span class="special">}?</span></code>
+ <code class="literal">S{N,M}?</code>
               </p>
               </td>
 <td>
@@ -1186,41 +1453,33 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">S</span><span class="special">?,</span>
- <span class="identifier">S</span><span class="special">*,</span>
- <span class="identifier">S</span><span class="special">+</span></code>
+ <code class="literal">S?, S*, S+</code>
               </p>
               </td>
 <td>
               <p>
- The same as <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="number">0</span><span class="special">,</span><span class="number">1</span><span class="special">}</span></code>,
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="number">0</span><span class="special">,</span><span class="identifier">UINT_MAX</span><span class="special">}</span></code>,
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="number">1</span><span class="special">,</span><span class="identifier">UINT_MAX</span><span class="special">}</span></code>
- respectively.
+ The same as <code class="literal">S{0,1}</code>, <code class="literal">S{0,UINT_MAX}</code>,
+ <code class="literal">S{1,UINT_MAX}</code> respectively.
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="identifier">S</span><span class="special">??,</span>
- <span class="identifier">S</span><span class="special">*?,</span>
- <span class="identifier">S</span><span class="special">+?</span></code>
+ <code class="literal">S??, S*?, S+?</code>
               </p>
               </td>
 <td>
               <p>
- The same as <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="number">0</span><span class="special">,</span><span class="number">1</span><span class="special">}?</span></code>,
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="number">0</span><span class="special">,</span><span class="identifier">UINT_MAX</span><span class="special">}?</span></code>,
- <code class="computeroutput"><span class="identifier">S</span><span class="special">{</span><span class="number">1</span><span class="special">,</span><span class="identifier">UINT_MAX</span><span class="special">}?</span></code>
- respectively.
+ The same as <code class="literal">S{0,1}?</code>, <code class="literal">S{0,UINT_MAX}?</code>,
+ <code class="literal">S{1,UINT_MAX}?</code> respectively.
               </p>
               </td>
 </tr>
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">(?&gt;</span><span class="identifier">S</span><span class="special">)</span></code>
+ <code class="literal">(?&gt;S)</code>
               </p>
               </td>
 <td>
@@ -1232,7 +1491,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">(?=</span><span class="identifier">S</span><span class="special">),</span> <span class="special">(?&lt;=</span><span class="identifier">S</span><span class="special">)</span></code>
+ <code class="literal">(?=S), (?&lt;=S)</code>
               </p>
               </td>
 <td>
@@ -1245,7 +1504,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">(?!</span><span class="identifier">S</span><span class="special">),</span> <span class="special">(?&lt;!</span><span class="identifier">S</span><span class="special">)</span></code>
+ <code class="literal">(?!S), (?&lt;!S)</code>
               </p>
               </td>
 <td>
@@ -1257,8 +1516,7 @@
 <tr>
 <td>
               <p>
- <code class="computeroutput"><span class="special">(?(</span><span class="identifier">condition</span><span class="special">)</span><span class="identifier">yes</span><span class="special">-</span><span class="identifier">pattern</span>
- <span class="special">|</span> <span class="identifier">no</span><span class="special">-</span><span class="identifier">pattern</span><span class="special">)</span></code>
+ <code class="literal">(?(condition)yes-pattern | no-pattern)</code>
               </p>
               </td>
 <td>
@@ -1271,41 +1529,40 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.perl_syntax.variations"></a><h4>
-<a name="id541265"></a>
+<a name="id659180"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
       </h4>
 <p>
         The <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">options
- <code class="computeroutput"><span class="identifier">normal</span></code>, <code class="computeroutput"><span class="identifier">ECMAScript</span></code>,
- <code class="computeroutput"><span class="identifier">JavaScript</span></code> and <code class="computeroutput"><span class="identifier">JScript</span></code></a> are all synonyms for <code class="computeroutput"><span class="identifier">perl</span></code>.
+ <code class="literal">normal</code>, <code class="literal">ECMAScript</code>, <code class="literal">JavaScript</code>
+ and <code class="literal">JScript</code></a> are all synonyms for <code class="literal">perl</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.options"></a><h4>
-<a name="id541360"></a>
+<a name="id659227"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
       </h4>
 <p>
         There are a <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">variety
- of flags</a> that may be combined with the <code class="computeroutput"><span class="identifier">perl</span></code>
- option when constructing the regular expression, in particular note that
- the <code class="computeroutput"><span class="identifier">newline_alt</span></code> option alters
- the syntax, while the <code class="computeroutput"><span class="identifier">collate</span></code>,
- <code class="computeroutput"><span class="identifier">nosubs</span></code> and <code class="computeroutput"><span class="identifier">icase</span></code> options modify how the case and locale
- sensitivity are to be applied.
+ of flags</a> that may be combined with the <code class="literal">perl</code> option
+ when constructing the regular expression, in particular note that the <code class="literal">newline_alt</code>
+ option alters the syntax, while the <code class="literal">collate</code>, <code class="literal">nosubs</code>
+ and <code class="literal">icase</code> options modify how the case and locale sensitivity
+ are to be applied.
       </p>
 <a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4>
-<a name="id541461"></a>
+<a name="id659275"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
         Modifiers</a>
       </h4>
 <p>
- The perl <code class="computeroutput"><span class="identifier">smix</span></code> modifiers can
- either be applied using a <code class="computeroutput"><span class="special">(?</span><span class="identifier">smix</span><span class="special">-</span><span class="identifier">smix</span><span class="special">)</span></code> prefix to the regular expression, or with
+ The perl <code class="literal">smix</code> modifiers can either be applied using a
+ <code class="literal">(?smix-smix)</code> prefix to the regular expression, or with
         one of the <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">regex-compile
- time flags <code class="computeroutput"><span class="identifier">no_mod_m</span></code>, <code class="computeroutput"><span class="identifier">mod_x</span></code>, <code class="computeroutput"><span class="identifier">mod_s</span></code>,
- and <code class="computeroutput"><span class="identifier">no_mod_s</span></code></a>.
+ time flags <code class="literal">no_mod_m</code>, <code class="literal">mod_x</code>, <code class="literal">mod_s</code>,
+ and <code class="literal">no_mod_s</code></a>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.references"></a><h4>
-<a name="id541588"></a>
+<a name="id659327"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
       </h4>
 <p>

Modified: branches/release/libs/regex/doc/html/boost_regex/unicode.html
==============================================================================
--- branches/release/libs/regex/doc/html/boost_regex/unicode.html (original)
+++ branches/release/libs/regex/doc/html/boost_regex/unicode.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Unicode and Boost.Regex</title>
 <link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="../index.html" title="Boost.Regex">
 <link rel="up" href="../index.html" title="Boost.Regex">
 <link rel="prev" href="introduction_and_overview.html" title="Introduction and Overview">
@@ -30,7 +30,7 @@
       There are two ways to use Boost.Regex with Unicode strings:
     </p>
 <a name="boost_regex.unicode.rely_on_wchar_t"></a><h5>
-<a name="id530083"></a>
+<a name="id648171"></a>
       <a class="link" href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
     </h5>
 <p>
@@ -56,7 +56,7 @@
       </li>
 </ul></div>
 <a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
-<a name="id530267"></a>
+<a name="id648289"></a>
       <a class="link" href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use
       a Unicode Aware Regular Expression Type.</a>
     </h5>

Modified: branches/release/libs/regex/doc/html/index.html
==============================================================================
--- branches/release/libs/regex/doc/html/index.html (original)
+++ branches/release/libs/regex/doc/html/index.html 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Boost.Regex</title>
 <link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_8125">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 <link rel="home" href="index.html" title="Boost.Regex">
 <link rel="next" href="boost_regex/configuration.html" title="Configuration">
 </head>
@@ -28,7 +28,7 @@
 </h3></div></div></div>
 <div><p class="copyright">Copyright © 1998 -2007 John Maddock</p></div>
 <div><div class="legalnotice">
-<a name="id473252"></a><p>
+<a name="id637869"></a><p>
         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)
       </p>
@@ -196,7 +196,7 @@
   </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: December 23, 2008 at 17:35:37 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 29, 2009 at 15:59:46 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: branches/release/libs/regex/doc/match_result.qbk
==============================================================================
--- branches/release/libs/regex/doc/match_result.qbk (original)
+++ branches/release/libs/regex/doc/match_result.qbk 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -71,9 +71,33 @@
       bool ``[link boost_regex.match_results.empty empty]``() const;
       // element access:
       difference_type ``[link boost_regex.match_results.length length]``(int sub = 0) const;
+ difference_type ``[link boost_regex.match_results.length length]``(const char_type* sub) const;
+ template <class charT>
+ difference_type ``[link boost_regex.match_results.length length]``(const charT* sub) const;
+ template <class charT, class Traits, class A>
+ difference_type ``[link boost_regex.match_results.length length]``(const std::basic_string<charT, Traits, A>& sub) const;
       difference_type ``[link boost_regex.match_results.position position]``(unsigned int sub = 0) const;
+ difference_type ``[link boost_regex.match_results.position position]``(const char_type* sub) const;
+ template <class charT>
+ difference_type ``[link boost_regex.match_results.position position]``(const charT* sub) const;
+ template <class charT, class Traits, class A>
+ difference_type ``[link boost_regex.match_results.position position]``(const std::basic_string<charT, Traits, A>& sub) const;
       string_type ``[link boost_regex.match_results.str str]``(int sub = 0) const;
+ string_type ``[link boost_regex.match_results.str str]``(const char_type* sub)const;
+ template <class Traits, class A>
+ string_type ``[link boost_regex.match_results.str str]``(const std::basic_string<char_type, Traits, A>& sub)const;
+ template <class charT>
+ string_type ``[link boost_regex.match_results.str str]``(const charT* sub)const;
+ template <class charT, class Traits, class A>
+ string_type ``[link boost_regex.match_results.str str]``(const std::basic_string<charT, Traits, A>& sub)const;
       const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(int n) const;
+ const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const char_type* n) const;
+ template <class Traits, class A>
+ const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const std::basic_string<char_type, Traits, A>& n) const;
+ template <class charT>
+ const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const charT* n) const;
+ template <class charT, class Traits, class A>
+ const_reference ``[link boost_regex.match_results.subscript operator\[\]]``(const std::basic_string<charT, Traits, A>& n) const;
 
       const_reference ``[link boost_regex.match_results.prefix prefix]``() const;
 
@@ -190,30 +214,86 @@
 [#boost_regex.match_results.length]
 
    difference_type length(int sub = 0)const;
+ difference_type length(const char_type* sub)const;
+ template <class charT>
+ difference_type length(const charT* sub)const;
+ template <class charT, class Traits, class A>
+ difference_type length(const std::basic_string<charT, Traits, A>&)const;
 
 [*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.
+
+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:
+in this case the characters will be widened to the underlying character type of the original regular expression.
+A compiler error will occur if the argument passes a wider character type than the underlying sequence.
+These overloads allow a normal narrow character C string literal to be used as an argument, even when
+the underlying character type of the expression being matched may be something more exotic such as a
+Unicode character type.
 
 [#boost_regex.match_results.position]
 
    difference_type position(unsigned int sub = 0)const;
+ difference_type position(const char_type* sub)const;
+ template <class charT>
+ difference_type position(const charT* sub)const;
+ template <class charT, class Traits, class A>
+ difference_type position(const std::basic_string<charT, Traits, A>&)const;
 
 [*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.
+
+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:
+in this case the characters will be widened to the underlying character type of the original regular expression.
+A compiler error will occur if the argument passes a wider character type than the underlying sequence.
+These overloads allow a normal narrow character C string literal to be used as an argument, even when
+the underlying character type of the expression being matched may be something more exotic such as a
+Unicode character type.
+
 
 [#boost_regex.match_results.str]
 
    string_type str(int sub = 0)const;
+ string_type str(const char_type* sub)const;
+ template <class Traits, class A>
+ string_type str(const std::basic_string<char_type, Traits, A>& sub)const;
+ template <class charT>
+ string_type str(const charT* sub)const;
+ template <class charT, class Traits, class A>
+ string_type str(const std::basic_string<charT, Traits, A>& sub)const;
 
 [*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/.
+In the event that there is no such named sub-expression then returns an empty string.
+
+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:
+in this case the characters will be widened to the underlying character type of the original regular expression.
+A compiler error will occur if the argument passes a wider character type than the underlying sequence.
+These overloads allow a normal narrow character C string literal to be used as an argument, even when
+the underlying character type of the expression being matched may be something more exotic such as a
+Unicode character type.
+
 
 [#boost_regex.match_results.subscript]
 
- const_reference operator[](int n) const;
+ const_reference operator[](int n) const;
+ const_reference operator[](const char_type* n) const;
+ template <class Traits, class A>
+ const_reference operator[](const std::basic_string<char_type, Traits, A>& n) const;
+ template <class charT>
+ const_reference operator[](const charT* n) const;
+ template <class charT, class Traits, class A>
+ const_reference operator[](const std::basic_string<charT, Traits, A>& n) const;
 
 [*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
@@ -222,6 +302,19 @@
 unmatched sub-expression, then returns a [sub_match] object whose matched
 member is false.
 
+The overloads that accept a string, return a reference to the [sub_match]
+object representing the character sequence that matched the named sub-expression /n/.
+In the event that there is no such named sub-expression then returns a [sub_match] object whose matched
+member is false.
+
+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:
+in this case the characters will be widened to the underlying character type of the original regular expression.
+A compiler error will occur if the argument passes a wider character type than the underlying sequence.
+These overloads allow a normal narrow character C string literal to be used as an argument, even when
+the underlying character type of the expression being matched may be something more exotic such as a
+Unicode character type.
+
 
 [#boost_regex.match_results.prefix]
 

Modified: branches/release/libs/regex/doc/syntax_perl.qbk
==============================================================================
--- branches/release/libs/regex/doc/syntax_perl.qbk (original)
+++ branches/release/libs/regex/doc/syntax_perl.qbk 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -12,7 +12,7 @@
 
 The Perl regular expression syntax is based on that used by the
 programming language Perl . Perl regular expressions are the
-default behavior in Boost.Regex or you can pass the flag `perl` to the
+default behavior in Boost.Regex or you can pass the flag =perl= to the
 [basic_regex] constructor, for example:
 
    // e1 is a case sensitive Perl regular expression:
@@ -34,9 +34,9 @@
 any single character except:
 
 * The NULL character when the [link boost_regex.ref.match_flag_type flag
- `match_not_dot_null`] is passed to the matching algorithms.
+ =match_not_dot_null=] is passed to the matching algorithms.
 * The newline character when the [link boost_regex.ref.match_flag_type
- flag `match_not_dot_newline`] is passed to
+ flag =match_not_dot_newline=] is passed to
    the matching algorithms.
    
 [h4 Anchors]
@@ -47,7 +47,7 @@
 
 [h4 Marked sub-expressions]
 
-A section beginning `(` and ending `)` acts as a marked sub-expression.
+A section beginning =(= and ending =)= acts as a marked sub-expression.
 Whatever matched the sub-expression is split out in a separate field by
 the matching algorithms. Marked sub-expressions can also repeated, or
 referred to by a back-reference.
@@ -58,23 +58,23 @@
 expression, but has the side-effect of spitting out an extra field in
 the result. As an alternative you can lexically group part of a
 regular expression, without generating a marked sub-expression by using
-`(?:` and `)` , for example `(?:ab)+` will repeat `ab` without splitting
+=(?:= and =)= , for example =(?:ab)+= will repeat =ab= without splitting
 out any separate sub-expressions.
 
 [h4 Repeats]
 
 Any atom (a single character, a marked sub-expression, or a character class)
-can be repeated with the `*`, `+`, `?`, and `{}` operators.
+can be repeated with the =*=, =+=, =?=, and ={}= operators.
 
-The `*` operator will match the preceding atom zero or more times,
-for example the expression `a*b` will match any of the following:
+The =*= operator will match the preceding atom zero or more times,
+for example the expression =a*b= will match any of the following:
 
    b
    ab
    aaaaaaaab
 
-The `+` operator will match the preceding atom one or more times, for
-example the expression `a+b` will match any of the following:
+The =+= operator will match the preceding atom one or more times, for
+example the expression =a+b= will match any of the following:
 
    ab
    aaaaaaaab
@@ -83,7 +83,7 @@
 
    b
 
-The `?` operator will match the preceding atom zero or one times, for
+The =?= operator will match the preceding atom zero or one times, for
 example the expression ca?b will match any of the following:
 
    cb
@@ -95,11 +95,11 @@
 
 An atom can also be repeated with a bounded repeat:
 
-`a{n}` Matches 'a' repeated exactly n times.
+=a{n}= Matches 'a' repeated exactly n times.
 
-`a{n,}` Matches 'a' repeated n or more times.
+=a{n,}= Matches 'a' repeated n or more times.
 
-`a{n, m}` Matches 'a' repeated between n and m times inclusive.
+=a{n, m}= Matches 'a' repeated between n and m times inclusive.
 
 For example:
 
@@ -120,7 +120,7 @@
 
    a(*)
 
-Will raise an error, as there is nothing for the `*` operator to be applied to.
+Will raise an error, as there is nothing for the =*= operator to be applied to.
 
 [h4 Non greedy repeats]
 
@@ -128,21 +128,38 @@
 much input as possible. There are non-greedy versions available that will
 consume as little input as possible while still producing a match.
 
-`*?` Matches the previous atom zero or more times, while consuming as little
+=*?= Matches the previous atom zero or more times, while consuming as little
    input as possible.
 
-`+?` Matches the previous atom one or more times, while consuming as
+=+?= Matches the previous atom one or more times, while consuming as
    little input as possible.
 
-`??` Matches the previous atom zero or one times, while consuming
+=??= Matches the previous atom zero or one times, while consuming
    as little input as possible.
 
-`{n,}?` Matches the previous atom n or more times, while consuming as
+={n,}?= Matches the previous atom n or more times, while consuming as
    little input as possible.
 
-`{n,m}?` Matches the previous atom between n and m times, while
+={n,m}?= Matches the previous atom between n and m times, while
    consuming as little input as possible.
    
+[h4 Pocessive repeats]
+
+By default when a repeated patten does not match then the engine will backtrack until
+a match is found. However, this behaviour can sometime be undesireable so there are
+also "pocessive" repeats: these match as much as possible and do not then allow
+backtracking if the rest of the expression fails to match.
+
+=*+= Matches the previous atom zero or more times, while giving nothing back.
+
+=++= Matches the previous atom one or more times, while giving nothing back.
+
+=?+= Matches the previous atom zero or one times, while giving nothing back.
+
+={n,}+= Matches the previous atom n or more times, while giving nothing back.
+
+={n,m}+= Matches the previous atom between n and m times, while giving nothing back.
+
 [h4 Back references]
 
 An escape character followed by a digit /n/, where /n/ is in the range 1-9,
@@ -158,27 +175,42 @@
 But not the string:
 
    aaabba
+
+You can also use the \g escape for the same function, for example:
+
+[table
+[[Escape][Meaning]]
+[[=\g1=][Match whatever matched sub-expression 1]]
+[[=\g{1}=][Match whatever matched sub-expression 1: this form allows for safer
+ parsing of the expression in cases like =\g{1}2= or for indexes higher than 9 as in =\g{1234}=]]
+[[=\g-1=][Match whatever matched the last opened sub-expression]]
+[[=\g{-2}=][Match whatever matched the last but one opened sub-expression]]
+[[=\g{one}=][Match whatever matched the sub-expression named "one"]]
+]
+
+Finally the \k escape can be used to refer to named subexpressions, for example [^\k<two>] will match
+whatever matched the subexpression named "two".
 
 [h4 Alternation]
 
-The `|` operator will match either of its arguments, so for example:
-`abc|def` will match either "abc" or "def".
+The =|= operator will match either of its arguments, so for example:
+=abc|def= will match either "abc" or "def".
 
-Parenthesis can be used to group alternations, for example: `ab(d|ef)`
+Parenthesis can be used to group alternations, for example: =ab(d|ef)=
 will match either of "abd" or "abef".
 
 Empty alternatives are not allowed (these are almost always a mistake), but
-if you really want an empty alternative use `(?:)` as a placeholder, for example:
+if you really want an empty alternative use =(?:)= as a placeholder, for example:
 
-`|abc` is not a valid expression, but
+=|abc= is not a valid expression, but
 
-`(?:)|abc` is and is equivalent, also the expression:
+=(?:)|abc= is and is equivalent, also the expression:
 
-`(?:abc)??` has exactly the same effect.
+=(?:abc)??= has exactly the same effect.
 
 [h4 Character sets]
 
-A character set is a bracket-expression starting with `[` and ending with `]`,
+A character set is a bracket-expression starting with =[= and ending with =]=,
 it defines a set of characters, and matches any single character that is a
 member of that set.
 
@@ -186,35 +218,35 @@
 
 [h5 Single characters]
 
-For example `[abc]`, will match any of the characters 'a', 'b', or 'c'.
+For example =[abc]=, will match any of the characters 'a', 'b', or 'c'.
 
 [h5 Character ranges]
 
-For example `[a-c]` will match any single character in the range 'a' to 'c'.
+For example =[a-c]= will match any single character in the range 'a' to 'c'.
 By default, for Perl regular expressions, a character x is within the
 range y to z, if the code point of the character lies within the codepoints of
 the endpoints of the range. Alternatively, if you set the
-[link boost_regex.ref.syntax_option_type.syntax_option_type_perl `collate` flag]
+[link boost_regex.ref.syntax_option_type.syntax_option_type_perl =collate= flag]
 when constructing the regular expression, then ranges are locale sensitive.
 
 [h5 Negation]
 
 If the bracket-expression begins with the ^ character, then it matches the
-complement of the characters it contains, for example `[^a-c]` matches
-any character that is not in the range `a-c`.
+complement of the characters it contains, for example =[^a-c]= matches
+any character that is not in the range =a-c=.
 
 [h5 Character classes]
 
-An expression of the form `[[:name:]]` matches the named character class
-"name", for example `[[:lower:]]` matches any lower case character.
+An expression of the form [^\[\[:name:\]\]] matches the named character class
+"name", for example [^\[\[:lower:\]\]] matches any lower case character.
 See [link boost_regex.syntax.character_classes character class names].
 
 [h5 Collating Elements]
 
-An expression of the form `[[.col.]` matches the collating element /col/.
+An expression of the form [^\[\[.col.\]\]] matches the collating element /col/.
 A collating element is any single character, or any sequence of characters
 that collates as a single unit. Collating elements may also be used
-as the end point of a range, for example: `[[.ae.]-c]` matches the
+as the end point of a range, for example: [^\[\[.ae.\]-c\]] matches the
 character sequence "ae", plus any single character in the range "ae"-c,
 assuming that "ae" is treated as a single collating element in the current locale.
 
@@ -223,11 +255,11 @@
 
    [[.NUL.]]
 
-matches a `\0` character.
+matches a =\0= character.
 
 [h5 Equivalence classes]
 
-An expression of the form `[[=col=]]`, matches any character or collating element
+An expression of the form [^\[\[\=col\=\]\]], matches any character or collating element
 whose primary sort key is the same as that for collating element /col/, as with
 collating elements the name /col/ may be a
 [link boost_regex.syntax.collating_names symbolic name]. A primary sort key is
@@ -250,7 +282,7 @@
 [h5 Combinations]
 
 All of the above can be combined in one character set declaration, for example:
-`[[:digit:]a-c[.NUL.]]`.
+[^\[\[:digit:\]a-c\[.NUL.\]\]].
 
 [h4 Escapes]
 
@@ -260,24 +292,24 @@
 
 [table
 [[Escape][Character]]
-[[`\a`][`\a`]]
-[[`\e`][`0x1B`]]
-[[`\f`][`\f`]]
-[[`\n`][`\n`]]
-[[`\r`][`\r`]]
-[[`\t`][`\t`]]
-[[`\v `][`\v`]]
-[[`\b`][`\b` (but only inside a character class declaration).]]
-[[`\cX`][An ASCII escape sequence - the character whose code point is X % 32]]
-[[`\xdd`][A hexadecimal escape sequence - matches the single character whose
+[[=\a=][=\a=]]
+[[=\e=][=0x1B=]]
+[[=\f=][=\f=]]
+[[=\n=][=\n=]]
+[[=\r=][=\r=]]
+[[=\t=][=\t=]]
+[[=\v=][=\v=]]
+[[=\b=][=\b= (but only inside a character class declaration).]]
+[[=\cX=][An ASCII escape sequence - the character whose code point is X % 32]]
+[[=\xdd=][A hexadecimal escape sequence - matches the single character whose
       code point is 0xdd.]]
-[[`\x{dddd}`][A hexadecimal escape sequence - matches the single character whose
+[[=\x{dddd}=][A hexadecimal escape sequence - matches the single character whose
       code point is 0xdddd.]]
-[[`\0ddd`][An octal escape sequence - matches the single character whose
+[[=\0ddd=][An octal escape sequence - matches the single character whose
    code point is 0ddd.]]
-[[`\N{name}`][Matches the single character which has the
+[[=\N{name}=][Matches the single character which has the
       [link boost_regex.syntax.collating_names symbolic name] /name/.
- For example `\N{newline}` matches the single character \\n.]]
+ For example =\N{newline}= matches the single character \\n.]]
 ]
  
 [h5 "Single character" character classes:]
@@ -296,11 +328,15 @@
 [[`\s`][`[[:space:]]`]]
 [[`\u`][`[[:upper:]]`]]
 [[`\w`][`[[:word:]]`]]
+[[`\h`][Horizontal whitespace]]
+[[`\v`][Vertical whitespace]]
 [[`\D`][`[^[:digit:]]`]]
 [[`\L`][`[^[:lower:]]`]]
 [[`\S`][`[^[:space:]]`]]
 [[`\U`][`[^[:upper:]]`]]
 [[`\W`][`[^[:word:]]`]]
+[[`\H`][Not Horizontal whitespace]]
+[[`\V`][Not Vertical whitespace]]
 ]
 
 [h5 Character Properties]
@@ -316,19 +352,19 @@
 [[`\P{Name}`][Matches any character that does not have the property Name.][`[^[:Name:]]`]]
 ]
 
-For example `\pd` matches any "digit" character, as does `\p{digit}`.
+For example =\pd= matches any "digit" character, as does =\p{digit}=.
 
 [h5 Word Boundaries]
 
 The following escape sequences match the boundaries of words:
 
-`\<` Matches the start of a word.
+=\<= Matches the start of a word.
 
-`\>` Matches the end of a word.
+=\>= Matches the end of a word.
 
-`\b` Matches a word boundary (the start or end of a word).
+=\b= Matches a word boundary (the start or end of a word).
 
-`\B` Matches only when not at a word boundary.
+=\B= Matches only when not at a word boundary.
 
 [h5 Buffer boundaries]
 
@@ -345,30 +381,44 @@
 \\z Matches at the end of a buffer only (the same as \\').
 
 \\Z Matches an optional sequence of newlines at the end of a buffer:
-equivalent to the regular expression `\n*\z`
+equivalent to the regular expression =\n*\z=
 
 [h5 Continuation Escape]
 
-The sequence `\G` matches only at the end of the last match found, or at
+The sequence =\G= matches only at the end of the last match found, or at
 the start of the text being matched if no previous match was found.
 This escape useful if you're iterating over the matches contained within a
 text, and you want each subsequence match to start where the last one ended.
 
 [h5 Quoting escape]
 
-The escape sequence `\Q` begins a "quoted sequence": all the subsequent characters
+The escape sequence =\Q= begins a "quoted sequence": all the subsequent characters
 are treated as literals, until either the end of the regular expression or \\E
-is found. For example the expression: `\Q\*+\Ea+` would match either of:
+is found. For example the expression: =\Q\*+\Ea+= would match either of:
 
     \*+a
     \*+aaa
 
 [h5 Unicode escapes]
 
-`\C` Matches a single code point: in Boost regex this has exactly the
+=\C= Matches a single code point: in Boost regex this has exactly the
    same effect as a "." operator.
-`\X` Matches a combining character sequence: that is any non-combining
+=\X= Matches a combining character sequence: that is any non-combining
       character followed by a sequence of zero or more combining characters.
+
+[h5 Matching Line Endings]
+
+The escape sequence =\R= matches any line ending character sequence, specifically it is identical to
+the expression [^(?>\x0D\x0A?|\[\x0A-\x0C\x85\x{2028}\x{2029}\])].
+
+[h5 Keeping back some text]
+
+=\K= Resets the start location of $0 to the current text position: in other words everything to the
+left of \K is "kept back" and does not form part of the regular expression match. $` is updated
+accordingly.
+
+For example =foo\Kbar= matched against the text "foobar" would return the match "bar" for $0 and "foo"
+for $`. This can be used to simulate variable width lookbehind assertions.
     
 [h5 Any other escape]
 
@@ -377,31 +427,62 @@
 
 [h4 Perl Extended Patterns]
 
-Perl-specific extensions to the regular expression syntax all start with `(?`.
+Perl-specific extensions to the regular expression syntax all start with =(?=.
+
+[h5 Named Subexpressions]
 
+You can create a named subexpression using:
+
+ (?<NAME>expression)
+
+Which can be then be refered to by the name /NAME/. Alternatively you can delimit the name
+using 'NAME' as in:
+
+ (?'NAME'expression)
+
+These named subexpressions can be refered to in a backreference using either [^\g{NAME}] or [^\k<NAME>]
+and can also be refered to by name in a [perl_format] format string for search and replace operations, or in the
+[match_results] member functions.
+
 [h5 Comments]
 
-`(?# ... )` is treated as a comment, it's contents are ignored.
+=(?# ... )= is treated as a comment, it's contents are ignored.
 
 [h5 Modifiers]
 
-`(?imsx-imsx ... )` alters which of the perl modifiers are in effect within
+=(?imsx-imsx ... )= alters which of the perl modifiers are in effect within
 the pattern, changes take effect from the point that the block is first seen
-and extend to any enclosing `)`. Letters before a '-' turn that perl
+and extend to any enclosing =)=. Letters before a '-' turn that perl
 modifier on, letters afterward, turn it off.
 
-`(?imsx-imsx:pattern)` applies the specified modifiers to pattern only.
+=(?imsx-imsx:pattern)= applies the specified modifiers to pattern only.
 
 [h5 Non-marking groups]
 
-`(?:pattern)` lexically groups pattern, without generating an additional
+=(?:pattern)= lexically groups pattern, without generating an additional
 sub-expression.
 
+[h5 Branch reset]
+
+=(?|pattern)= resets the subexpression count at the start of each "|" alternative within /pattern/.
+
+The sub-expression count following this construct is that of whichever branch had the largest number of
+sub-expressions. This construct is useful when you want to capture one of a number of alternative matches
+in a single sub-expression index.
+
+In the following example the index of each sub-expression is shown below the expression:
+
+[pre
+# before ---------------branch-reset----------- after
+/ ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
+# 1 2 2 3 2 3 4
+]
+
 [h5 Lookahead]
 
-`(?=pattern)` consumes zero characters, only if pattern matches.
+[^(?=pattern)] consumes zero characters, only if pattern matches.
 
-`(?!pattern)` consumes zero characters, only if pattern does not match.
+=(?!pattern)= consumes zero characters, only if pattern does not match.
 
 Lookahead is typically used to create the logical AND of two regular
 expressions, for example if a password must contain a lower case letter,
@@ -414,43 +495,68 @@
 
 [h5 Lookbehind]
 
-`(?<=pattern)` consumes zero characters, only if pattern could be matched
+[^(?<=pattern)] consumes zero characters, only if pattern could be matched
 against the characters preceding the current position (pattern must be
 of fixed length).
 
-`(?<!pattern)` consumes zero characters, only if pattern could not be
+=(?<!pattern)= consumes zero characters, only if pattern could not be
 matched against the characters preceding the current position (pattern must
 be of fixed length).
 
 [h5 Independent sub-expressions]
 
-`(?>pattern)` /pattern/ is matched independently of the surrounding patterns,
+=(?>pattern)= /pattern/ is matched independently of the surrounding patterns,
 the expression will never backtrack into /pattern/. Independent sub-expressions
 are typically used to improve performance; only the best possible match
 for pattern will be considered, if this doesn't allow the expression as a
 whole to match then no match is found at all.
 
+[h5 Recursive Expressions]
+
+[^(?['N]) (?-['N]) (?+['N]) (?R) (?0)]
+
+=(?R)= and =(?0)= recurse to the start of the entire pattern.
+
+[^(?['N])] executes sub-expression /N/ recursively, for example =(?2)= will recurse to sub-expression 2.
+
+[^(?-['N])] and [^(?+['N])] are relative recursions, so for example =(?-1)= recurses to the last sub-expression to be declared,
+and =(?+1)= recurses to the next sub-expression to be declared.
+
 [h5 Conditional Expressions]
 
-`(?(condition)yes-pattern|no-pattern)` attempts to match /yes-pattern/ if
+=(?(condition)yes-pattern|no-pattern)= attempts to match /yes-pattern/ if
 the /condition/ is true, otherwise attempts to match /no-pattern/.
 
-`(?(condition)yes-pattern)` attempts to match /yes-pattern/ if the /condition/
+=(?(condition)yes-pattern)= attempts to match /yes-pattern/ if the /condition/
 is true, otherwise fails.
 
-/condition/ may be either a forward lookahead assert, or the index of
+/condition/ may be either: a forward lookahead assert, the index of
 a marked sub-expression (the condition becomes true if the sub-expression
-has been matched).
+has been matched), or an index of a recursion (the condition become true if we are executing
+directly inside the specified recursion).
+
+Here is a summary of the possible predicates:
+
+* [^(?(?\=assert)yes-pattern|no-pattern)] Executes /yes-pattern/ if the forward look-ahead assert matches, otherwise
+executes /no-pattern/.
+* =(?(?!assert)yes-pattern|no-pattern)= Executes /yes-pattern/ if the forward look-ahead assert does not match, otherwise
+executes /no-pattern/.
+* =(?(R)yes-pattern|no-pattern)= Executes /yes-pattern/ if we are executing inside a recursion, otherwise
+executes /no-pattern/.
+* [^(?(R['N])yes-pattern|no-pattern)] Executes /yes-pattern/ if we are executing inside a recursion to sub-expression /N/, otherwise
+executes /no-pattern/.
+* [^(?(DEFINE)never-exectuted-pattern)] Defines a block of code that is never executed and matches no characters:
+this is usually used to define one or more named sub-expressions which are refered to from elsewhere in the pattern.
 
 [h4 Operator precedence]
 
 The order of precedence for of operators is as follows:
 
 # Collation-related bracket symbols `[==] [::] [..]`
-# Escaped characters `\`
+# Escaped characters =\=
 # Character set (bracket expression) `[]`
-# Grouping `()`
-# Single-character-ERE duplication `* + ? {m,n}`
+# Grouping =()=
+# Single-character-ERE duplication =* + ? {m,n}=
 # Concatenation
 # Anchoring ^$
 # Alternation |
@@ -469,42 +575,42 @@
 
 [table
 [[Construct][What gets matched]]
-[[`AtomA AtomB`][Locates the best match for /AtomA/ that has a following match for /AtomB/.]]
-[[`Expression1 | Expression2`][If /Expresion1/ can be matched then returns that match,
+[[=AtomA AtomB=][Locates the best match for /AtomA/ that has a following match for /AtomB/.]]
+[[=Expression1 | Expression2=][If /Expresion1/ can be matched then returns that match,
    otherwise attempts to match /Expression2/.]]
-[[`S{N}`][Matches /S/ repeated exactly N times.]]
-[[`S{N,M}`][Matches S repeated between N and M times, and as many times as possible.]]
-[[`S{N,M}?`][Matches S repeated between N and M times, and as few times as possible.]]
-[[`S?, S*, S+`][The same as `S{0,1}`, `S{0,UINT_MAX}`, `S{1,UINT_MAX}` respectively.]]
-[[`S??, S*?, S+?`][The same as `S{0,1}?`, `S{0,UINT_MAX}?`, `S{1,UINT_MAX}?` respectively.]]
-[[`(?>S)`][Matches the best match for /S/, and only that.]]
-[[`(?=S), (?<=S)`][Matches only the best match for /S/ (this is only
+[[=S{N}=][Matches /S/ repeated exactly N times.]]
+[[=S{N,M}=][Matches S repeated between N and M times, and as many times as possible.]]
+[[=S{N,M}?=][Matches S repeated between N and M times, and as few times as possible.]]
+[[=S?, S*, S+=][The same as =S{0,1}=, =S{0,UINT_MAX}=, =S{1,UINT_MAX}= respectively.]]
+[[=S??, S*?, S+?=][The same as =S{0,1}?=, =S{0,UINT_MAX}?=, =S{1,UINT_MAX}?= respectively.]]
+[[=(?>S)=][Matches the best match for /S/, and only that.]]
+[[[^(?=S), (?<=S)]][Matches only the best match for /S/ (this is only
       visible if there are capturing parenthesis within /S/).]]
-[[`(?!S), (?<!S)`][Considers only whether a match for S exists or not.]]
-[[`(?(condition)yes-pattern | no-pattern)`][If condition is true, then
+[[=(?!S), (?<!S)=][Considers only whether a match for S exists or not.]]
+[[=(?(condition)yes-pattern | no-pattern)=][If condition is true, then
    only yes-pattern is considered, otherwise only no-pattern is considered.]]
 ]
 
 [h3 Variations]
 
-The [link boost_regex.ref.syntax_option_type.syntax_option_type_perl options `normal`,
-`ECMAScript`, `JavaScript` and `JScript`] are all synonyms for
-`perl`.
+The [link boost_regex.ref.syntax_option_type.syntax_option_type_perl options =normal=,
+=ECMAScript=, =JavaScript= and =JScript=] are all synonyms for
+=perl=.
 
 [h3 Options]
 
 There are a [link boost_regex.ref.syntax_option_type.syntax_option_type_perl
-variety of flags] that may be combined with the `perl` option when
+variety of flags] that may be combined with the =perl= option when
 constructing the regular expression, in particular note that the
-`newline_alt` option alters the syntax, while the `collate`, `nosubs` and
-`icase` options modify how the case and locale sensitivity are to be applied.
+=newline_alt= option alters the syntax, while the =collate=, =nosubs= and
+=icase= options modify how the case and locale sensitivity are to be applied.
 
 [h3 Pattern Modifiers]
 
-The perl `smix` modifiers can either be applied using a `(?smix-smix)`
+The perl =smix= modifiers can either be applied using a =(?smix-smix)=
 prefix to the regular expression, or with one of the
 [link boost_regex.ref.syntax_option_type.syntax_option_type_perl regex-compile time
-flags `no_mod_m`, `mod_x`, `mod_s`, and `no_mod_s`].
+flags =no_mod_m=, =mod_x=, =mod_s=, and =no_mod_s=].
 
 [h3 References]
 

Modified: branches/release/libs/regex/src/c_regex_traits.cpp
==============================================================================
--- branches/release/libs/regex/src/c_regex_traits.cpp (original)
+++ branches/release/libs/regex/src/c_regex_traits.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -122,7 +122,9 @@
    char_class_graph=char_class_alnum|char_class_punct,
    char_class_blank=1<<9,
    char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal=1<<12,
+ char_class_vertical=1<<13
 };
 
 c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_classname(const char* p1, const char* p2)
@@ -137,6 +139,7 @@
       char_class_digit,
       char_class_digit,
       char_class_graph,
+ char_class_horizontal,
       char_class_lower,
       char_class_lower,
       char_class_print,
@@ -146,6 +149,7 @@
       char_class_upper,
       char_class_unicode,
       char_class_upper,
+ char_class_vertical,
       char_class_alnum | char_class_word,
       char_class_alnum | char_class_word,
       char_class_xdigit,
@@ -176,7 +180,9 @@
       || ((mask & char_class_punct) && (std::ispunct)(static_cast<unsigned char>(c)))
       || ((mask & char_class_xdigit) && (std::isxdigit)(static_cast<unsigned char>(c)))
       || ((mask & char_class_blank) && (std::isspace)(static_cast<unsigned char>(c)) && !::boost::re_detail::is_separator(c))
- || ((mask & char_class_word) && (c == '_'));
+ || ((mask & char_class_word) && (c == '_'))
+ || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ || ((mask & char_class_horizontal) && (std::isspace)(static_cast<unsigned char>(c)) && !::boost::re_detail::is_separator(c) && (c != '\v'));
 }
 
 c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_collatename(const char* p1, const char* p2)

Modified: branches/release/libs/regex/src/icu.cpp
==============================================================================
--- branches/release/libs/regex/src/icu.cpp (original)
+++ branches/release/libs/regex/src/icu.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -101,6 +101,8 @@
 const icu_regex_traits::char_class_type icu_regex_traits::mask_unicode = icu_regex_traits::char_class_type(1) << offset_unicode;
 const icu_regex_traits::char_class_type icu_regex_traits::mask_any = icu_regex_traits::char_class_type(1) << offset_any;
 const icu_regex_traits::char_class_type icu_regex_traits::mask_ascii = icu_regex_traits::char_class_type(1) << offset_ascii;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_horizontal = icu_regex_traits::char_class_type(1) << offset_horizontal;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_vertical = icu_regex_traits::char_class_type(1) << offset_vertical;
 
 icu_regex_traits::char_class_type icu_regex_traits::lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2)
 {
@@ -370,6 +372,7 @@
       U_GC_ND_MASK,
       U_GC_ND_MASK,
       (0x3FFFFFFFu) & ~(U_GC_CC_MASK | U_GC_CF_MASK | U_GC_CS_MASK | U_GC_CN_MASK | U_GC_Z_MASK),
+ mask_horizontal,
       U_GC_LL_MASK,
       U_GC_LL_MASK,
       ~(U_GC_C_MASK),
@@ -379,6 +382,7 @@
       U_GC_LU_MASK,
       mask_unicode,
       U_GC_LU_MASK,
+ mask_vertical,
       char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
       char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
       char_class_type(U_GC_ND_MASK) | mask_xdigit,
@@ -487,6 +491,10 @@
       return true;
    if(((f & mask_ascii) != 0) && (c <= 0x7F))
       return true;
+ if(((f & mask_vertical) != 0) && (::boost::re_detail::is_separator(c) || (c == static_cast<char_type>('\v')) || (m == U_GC_ZL_MASK) || (m == U_GC_ZP_MASK)))
+ return true;
+ if(((f & mask_horizontal) != 0) && !::boost::re_detail::is_separator(c) && u_isspace(c) && (c != static_cast<char_type>('\v')))
+ return true;
    return false;
 }
 

Modified: branches/release/libs/regex/src/regex_traits_defaults.cpp
==============================================================================
--- branches/release/libs/regex/src/regex_traits_defaults.cpp (original)
+++ branches/release/libs/regex/src/regex_traits_defaults.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -100,6 +100,9 @@
          "p",
          "P",
          "N",
+ "g",
+ "K",
+ "R",
    };
 
    return ((n >= (sizeof(messages) / sizeof(messages[1]))) ? "" : messages[n]);
@@ -375,14 +378,14 @@
       regex_constants::escape_type_not_class, /*H*/
       regex_constants::escape_type_not_class, /*I*/
       regex_constants::escape_type_not_class, /*J*/
- regex_constants::escape_type_not_class, /*K*/
+ regex_constants::escape_type_reset_start_mark, /*K*/
       regex_constants::escape_type_not_class, /*L*/
       regex_constants::escape_type_not_class, /*M*/
       regex_constants::escape_type_named_char, /*N*/
       regex_constants::escape_type_not_class, /*O*/
       regex_constants::escape_type_not_property, /*P*/
       regex_constants::escape_type_Q, /*Q*/
- regex_constants::escape_type_not_class, /*R*/
+ regex_constants::escape_type_line_ending, /*R*/
       regex_constants::escape_type_not_class, /*S*/
       regex_constants::escape_type_not_class, /*T*/
       regex_constants::escape_type_not_class, /*U*/
@@ -403,11 +406,11 @@
       regex_constants::escape_type_class, /*d*/
       regex_constants::escape_type_e, /*e*/
       regex_constants::escape_type_control_f, /*f*/
- regex_constants::escape_type_class, /*g*/
+ regex_constants::escape_type_extended_backref, /*g*/
       regex_constants::escape_type_class, /*h*/
       regex_constants::escape_type_class, /*i*/
       regex_constants::escape_type_class, /*j*/
- regex_constants::escape_type_class, /*k*/
+ regex_constants::escape_type_extended_backref, /*k*/
       regex_constants::escape_type_class, /*l*/
       regex_constants::escape_type_class, /*m*/
       regex_constants::escape_type_control_n, /*n*/
@@ -534,7 +537,7 @@
       regex_constants::syntax_dollar, /*$*/
       regex_constants::syntax_char, /*%*/
       regex_constants::syntax_char, /*&*/
- regex_constants::syntax_char, /*'*/
+ regex_constants::escape_type_end_buffer, /*'*/
       regex_constants::syntax_open_mark, /*(*/
       regex_constants::syntax_close_mark, /*)*/
       regex_constants::syntax_star, /***/

Modified: branches/release/libs/regex/src/usinstances.cpp
==============================================================================
--- branches/release/libs/regex/src/usinstances.cpp (original)
+++ branches/release/libs/regex/src/usinstances.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -23,7 +23,8 @@
 #include <string>
 
 #if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \
- && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
+ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\
+ && BOOST_WORKAROUND(BOOST_MSVC, <1600)
 //
 // This is a horrible workaround, but without declaring these symbols extern we get
 // duplicate symbol errors when linking if the application is built without

Modified: branches/release/libs/regex/src/wc_regex_traits.cpp
==============================================================================
--- branches/release/libs/regex/src/wc_regex_traits.cpp (original)
+++ branches/release/libs/regex/src/wc_regex_traits.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -24,7 +24,8 @@
 #include <string>
 
 #if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \
- && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
+ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\
+ && BOOST_WORKAROUND(BOOST_MSVC, <1600)
 //
 // This is a horrible workaround, but without declaring these symbols extern we get
 // duplicate symbol errors when linking if the application is built without
@@ -161,7 +162,9 @@
    char_class_graph=char_class_alnum|char_class_punct,
    char_class_blank=1<<9,
    char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal=1<<12,
+ char_class_vertical=1<<13
 };
 
 c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_classname(const wchar_t* p1, const wchar_t* p2)
@@ -176,6 +179,7 @@
       char_class_digit,
       char_class_digit,
       char_class_graph,
+ char_class_horizontal,
       char_class_lower,
       char_class_lower,
       char_class_print,
@@ -185,6 +189,7 @@
       char_class_upper,
       char_class_unicode,
       char_class_upper,
+ char_class_vertical,
       char_class_alnum | char_class_word,
       char_class_alnum | char_class_word,
       char_class_xdigit,
@@ -216,7 +221,9 @@
       || ((mask & char_class_xdigit) && (std::iswxdigit)(c))
       || ((mask & char_class_blank) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c))
       || ((mask & char_class_word) && (c == '_'))
- || ((mask & char_class_unicode) && (c & ~static_cast<wchar_t>(0xff)));
+ || ((mask & char_class_unicode) && (c & ~static_cast<wchar_t>(0xff)))
+ || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == L'\v')))
+ || ((mask & char_class_horizontal) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c) && (c != L'\v'));
 }
 
 c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_collatename(const wchar_t* p1, const wchar_t* p2)

Modified: branches/release/libs/regex/test/Jamfile.v2
==============================================================================
--- branches/release/libs/regex/test/Jamfile.v2 (original)
+++ branches/release/libs/regex/test/Jamfile.v2 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -87,6 +87,10 @@
             ../build//boost_regex
       ]
       
+ [ run named_subexpressions/named_subexpressions_test.cpp
+ ../build//boost_regex
+ ]
+
       [ run unicode/unicode_iterator_test.cpp ../build//boost_regex ]
       [ run static_mutex/static_mutex_test.cpp
             ../../thread/build//boost_thread ../build//boost_regex

Modified: branches/release/libs/regex/test/regress/main.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/main.cpp (original)
+++ branches/release/libs/regex/test/regress/main.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -70,6 +70,9 @@
    RUN_TESTS(test_operators);
    RUN_TESTS(test_overloads);
    RUN_TESTS(test_unicode);
+ RUN_TESTS(test_pocessive_repeats);
+ RUN_TESTS(test_mark_resets);
+ RUN_TESTS(test_recursion);
 }
 
 int cpp_main(int /*argc*/, char * /*argv*/[])

Modified: branches/release/libs/regex/test/regress/test.hpp
==============================================================================
--- branches/release/libs/regex/test/regress/test.hpp (original)
+++ branches/release/libs/regex/test/regress/test.hpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -258,6 +258,8 @@
 void test_operators();
 void test_overloads();
 void test_unicode();
-
+void test_pocessive_repeats();
+void test_mark_resets();
+void test_recursion();
 
 #endif

Modified: branches/release/libs/regex/test/regress/test_backrefs.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_backrefs.cpp (original)
+++ branches/release/libs/regex/test/regress/test_backrefs.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -55,5 +55,53 @@
    TEST_REGEX_SEARCH("\\(a\\)\\1bc*[ce]d", basic, "aabcccd", match_default, make_array(0, 7, 0, 1, -2, -2));
    TEST_REGEX_SEARCH("^\\(a\\)\\1b\\(c\\)*cd$", basic, "aabcccd", match_default, make_array(0, 7, 0, 1, 4, 5, -2, -2));
    TEST_REGEX_SEARCH("\\(ab*\\)[ab]*\\1", basic, "ababaaa", match_default, make_array(0, 7, 0, 1, -2, -2));
+ //
+ // Now test the \g version:
+ //
+ TEST_INVALID_REGEX("a(b)\\g2c", perl);
+ TEST_INVALID_REGEX("a(b\\g1)c", perl);
+ TEST_INVALID_REGEX("a(b\\g0)c", perl);
+ TEST_REGEX_SEARCH("a(b*)c\\g1d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g1d", perl, "abbcbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g1d", perl, "abbcbbbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(.)\\g1", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a([bc])\\g1d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
+ TEST_INVALID_REGEX("a(b)\\g{2}c", perl);
+ TEST_INVALID_REGEX("a(b\\g{1})c", perl);
+ TEST_INVALID_REGEX("a(b\\g{0})c", perl);
+ TEST_REGEX_SEARCH("a(b*)c\\g{1}d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g{1}d", perl, "abbcbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g{1}d", perl, "abbcbbbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(.)\\g{1}", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a([bc])\\g{1}d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
+ // And again but with negative indexes:
+ TEST_INVALID_REGEX("a(b)\\g-2c", perl);
+ TEST_INVALID_REGEX("a(b\\g-1)c", perl);
+ TEST_INVALID_REGEX("a(b\\g-0)c", perl);
+ TEST_REGEX_SEARCH("a(b*)c\\g-1d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g-1d", perl, "abbcbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g-1d", perl, "abbcbbbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(.)\\g1", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a([bc])\\g1d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
+ TEST_INVALID_REGEX("a(b)\\g{-2}c", perl);
+ TEST_INVALID_REGEX("a(b\\g{-1})c", perl);
+ TEST_REGEX_SEARCH("a(b*)c\\g{-1}d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g{-1}d", perl, "abbcbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(b*)c\\g{-1}d", perl, "abbcbbbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(.)\\g{-1}", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a([bc])\\g{-1}d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
+
+ // And again but with named subexpressions:
+ TEST_REGEX_SEARCH("a(?<foo>(?<bar>(?<bb>(?<aa>b*))))c\\g{foo}d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, 1, 3, 1, 3, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("a(?<foo>(?<bar>(?<bb>(?<aa>b*))))c\\g{foo}d", perl, "abbcbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(?<foo>(?<bar>(?<bb>(?<aa>b*))))c\\g{foo}d", perl, "abbcbbbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(?<foo>.)\\g{foo}", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(?<foo>[bc])\\g{foo}d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
+
+ TEST_REGEX_SEARCH("a(?'foo'(?'bar'(?'bb'(?'aa'b*))))c\\g{foo}d", perl, "abbcbbd", match_default, make_array(0, 7, 1, 3, 1, 3, 1, 3, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("a(?'foo'(?'bar'(?'bb'(?'aa'b*))))c\\g{foo}d", perl, "abbcbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(?'foo'(?'bar'(?'bb'(?'aa'b*))))c\\g{foo}d", perl, "abbcbbbd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(?'foo'.)\\g{foo}", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a(?'foo'[bc])\\g{foo}d", perl, "abcdabbd", match_default, make_array(4, 8, 5, 6, -2, -2));
 }
 

Modified: branches/release/libs/regex/test/regress/test_deprecated.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_deprecated.cpp (original)
+++ branches/release/libs/regex/test/regress/test_deprecated.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -107,7 +107,7 @@
       int i = 0;
       while(results[2*i] != -2)
       {
- if(max_subs > i)
+ if((int)max_subs > i)
          {
             if(results[2*i] != matches[i].rm_so)
             {
@@ -231,7 +231,7 @@
       int i = 0;
       while(results[2*i] != -2)
       {
- if(max_subs > i)
+ if((int)max_subs > i)
          {
             if(results[2*i] != matches[i].rm_so)
             {

Modified: branches/release/libs/regex/test/regress/test_escapes.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_escapes.cpp (original)
+++ branches/release/libs/regex/test/regress/test_escapes.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -144,5 +144,23 @@
    TEST_REGEX_SEARCH("a\\Gbc", perl, "abc", match_default, make_array(-2, -2));
    TEST_REGEX_SEARCH("a\\Aab", perl, "abc", match_default, make_array(-2, -2));
    TEST_REGEX_SEARCH("abc(?:\\Z|$)", perl, "abc\n\n", match_default, make_array(0, 3, -2, -2));
+
+ // Buffer reset \K:
+ TEST_REGEX_SEARCH("(foo)\\Kbar", perl, "foobar", match_default, make_array(3, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(foo)(\\Kbar|baz)", perl, "foobar", match_default, make_array(3, 6, 0, 3, 3, 6, -2, -2));
+ TEST_REGEX_SEARCH("(foo)(\\Kbar|baz)", perl, "foobaz", match_default, make_array(0, 6, 0, 3, 3, 6, -2, -2));
+ TEST_REGEX_SEARCH("(foo\\Kbar)baz", perl, "foobarbaz", match_default, make_array(3, 9, 0, 6, -2, -2));
+
+ // Line ending \R:
+ TEST_REGEX_SEARCH("\\R", perl, "foo\nbar", match_default, make_array(3, 4, -2, -2));
+ TEST_REGEX_SEARCH("\\R", perl, "foo\rbar", match_default, make_array(3, 4, -2, -2));
+ TEST_REGEX_SEARCH("\\R", perl, "foo\r\nbar", match_default, make_array(3, 5, -2, -2));
+ // see if \u works:
+ const wchar_t* w = L"\u2028";
+ if(*w == 0x2028u)
+ {
+ TEST_REGEX_SEARCH_W(L"\\R", perl, L"foo\u2028bar", match_default, make_array(3, 4, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\R", perl, L"foo\u2029bar", match_default, make_array(3, 4, -2, -2));
+ }
 }
 

Modified: branches/release/libs/regex/test/regress/test_non_greedy_repeats.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_non_greedy_repeats.cpp (original)
+++ branches/release/libs/regex/test/regress/test_non_greedy_repeats.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -41,6 +41,5 @@
    TEST_REGEX_SEARCH("xx[/-]{0,2}?(?:[+-][0-9])??\\z", perl, "xx--", match_default, make_array(0, 4, -2, -2));
    TEST_INVALID_REGEX("a{1,3}{1}", perl);
    TEST_INVALID_REGEX("a**", perl);
- TEST_INVALID_REGEX("a++", perl);
 }
 

Modified: branches/release/libs/regex/test/regress/test_perl_ex.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_perl_ex.cpp (original)
+++ branches/release/libs/regex/test/regress/test_perl_ex.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -651,3 +651,246 @@
 #endif
 }
 
+void test_mark_resets()
+{
+ using namespace boost::regex_constants;
+
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))", perl, "abc", match_default, make_array(0, 3, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))", perl, "xyz", match_default, make_array(0, 3, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(x)(?|(abc)|(xyz))(x)", perl, "xabcx", match_default, make_array(0, 5, 0, 1, 1, 4, 4, 5, -2, -2));
+ TEST_REGEX_SEARCH("(x)(?|(abc)|(xyz))(x)", perl, "xxyzx", match_default, make_array(0, 5, 0, 1, 1, 4, 4, 5, -2, -2));
+ TEST_REGEX_SEARCH("(x)(?|(abc)(pqr)|(xyz))(x)", perl, "xabcpqrx", match_default, make_array(0, 8, 0, 1, 1, 4, 4, 7, 7, 8, -2, -2));
+ TEST_REGEX_SEARCH("(x)(?|(abc)(pqr)|(xyz))(x)", perl, "xxyzx", match_default, make_array(0, 5, 0, 1, 1, 4, -1, -1, 4, 5, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))\\1", perl, "abcabc", match_default, make_array(0, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))\\1", perl, "xyzxyz", match_default, make_array(0, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))\\1", perl, "abcxyz", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))\\1", perl, "xyzabc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))(?1)", perl, "abcabc", match_default, make_array(0, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))(?1)", perl, "xyzabc", match_default, make_array(0, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))(?1)", perl, "xyzxyz", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^X(?5)(a)(?|(b)|(q))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_INVALID_REGEX("^X(?5)(a)(?|(b)|(q))(c)(d)Y", perl);
+ TEST_REGEX_SEARCH("^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_REGEX_SEARCH("^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, -1, -1, -1, -1, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_REGEX_SEARCH("^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, -1, -1, -1, -1, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_REGEX_SEARCH("^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, -1, -1, -1, -1, 4, 5, 5, 6, 6, 7, -2, -2));
+}
+
+void test_recursion()
+{
+ using namespace boost::regex_constants;
+
+ TEST_INVALID_REGEX("(a(?2)b)", perl);
+ TEST_INVALID_REGEX("(a(?1b))", perl);
+ TEST_REGEX_SEARCH("(a(?1)b)", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(a(?1)+b)", perl, "abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^([^()]|\\((?1)*\\))*$", perl, "abc", match_default, make_array(0, 3, 2, 3, -2, -2));
+ TEST_REGEX_SEARCH("^([^()]|\\((?1)*\\))*$", perl, "a(b)c", match_default, make_array(0, 5, 4, 5, -2, -2));
+ TEST_REGEX_SEARCH("^([^()]|\\((?1)*\\))*$", perl, "a(b(c))d", match_default, make_array(0, 8, 7, 8, -2, -2));
+ TEST_REGEX_SEARCH("^([^()]|\\((?1)*\\))*$", perl, "a(b(c)d", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^>abc>([^()]|\\((?1)*\\))*<xyz<$", perl, ">abc>123<xyz<", match_default, make_array(0, 13, 7, 8, -2, -2));
+ TEST_REGEX_SEARCH("^>abc>([^()]|\\((?1)*\\))*<xyz<$", perl, ">abc>1(2)3<xyz<", match_default, make_array(0, 15, 9, 10, -2, -2));
+ TEST_REGEX_SEARCH("^>abc>([^()]|\\((?1)*\\))*<xyz<$", perl, ">abc>(1(2)3)<xyz<", match_default, make_array(0, 17, 5, 12, -2, -2));
+ //TEST_REGEX_SEARCH("^\\W*(?:((.)\\W*(?1)\\W*\\2|)|((.)\\W*(?3)\\W*\\4|\\W*.\\W*))\\W*$", perl|icase, "1221", match_default, make_array(0, 4, 0, 4, 0, 1, -1, -1, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("^\\W*(?:((.)\\W*(?1)\\W*\\2|)|((.)\\W*(?3)\\W*\\4|\\W*.\\W*))\\W*$", perl|icase, "Satan, oscillate my metallic sonatas!", match_default, make_array(0, 37, -1, -1, -1, -1, 0, 36, 0, 1, -2, -2));
+ //TEST_REGEX_SEARCH("^\\W*(?:((.)\\W*(?1)\\W*\\2|)|((.)\\W*(?3)\\W*\\4|\\W*.\\W*))\\W*$", perl|icase, "A man, a plan, a canal: Panama!", match_default, make_array(0, 31, -1, -1, -1, -1, 0, 30, 0, 1, -2, -2));
+ //TEST_REGEX_SEARCH("^\\W*(?:((.)\\W*(?1)\\W*\\2|)|((.)\\W*(?3)\\W*\\4|\\W*.\\W*))\\W*$", perl|icase, "Able was I ere I saw Elba.", match_default, make_array(0, 26, -1, -1, -1, -1, 0, 25, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("^\\W*(?:((.)\\W*(?1)\\W*\\2|)|((.)\\W*(?3)\\W*\\4|\\W*.\\W*))\\W*$", perl|icase, "The quick brown fox", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$", perl|icase, "12", match_default, make_array(0, 2, 0, 2, -1, -1, -2, -2));
+ //TEST_REGEX_SEARCH("^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$", perl|icase, "(((2+2)*-3)-7)", match_default, make_array(0, 14, 0, 14, 11, 12, -2, -2));
+ TEST_REGEX_SEARCH("^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$", perl|icase, "-12", match_default, make_array(0, 3, 0, 3, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$", perl|icase, "((2+2)*-3)-7)", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(x(y|(?1){2})z)", perl|icase, "xyz", match_default, make_array(0, 3, 0, 3, 1, 2, -2, -2));
+ TEST_REGEX_SEARCH("^(x(y|(?1){2})z)", perl|icase, "xxyzxyzz", match_default, make_array(0, 8, 0, 8, 1, 7, -2, -2));
+ TEST_REGEX_SEARCH("^(x(y|(?1){2})z)", perl|icase, "xxyzz", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("^(x(y|(?1){2})z)", perl|icase, "xxyzxyzxyzz", match_default, make_array(-2, -2));
+ TEST_INVALID_REGEX("(?1)", perl);
+ TEST_INVALID_REGEX("((?2)(abc)", perl);
+ TEST_REGEX_SEARCH("^(a|b|c)=(?1)+", perl|icase, "a=a", match_default, make_array(0, 3, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("^(a|b|c)=(?1)+", perl|icase, "a=b", match_default, make_array(0, 3, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("^(a|b|c)=(?1)+", perl|icase, "a=bc", match_default, make_array(0, 4, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("^(a|b|c)=((?1))+", perl|icase, "a=a", match_default, make_array(0, 3, 0, 1, 2, 3, -2, -2));
+ TEST_REGEX_SEARCH("^(a|b|c)=((?1))+", perl|icase, "a=b", match_default, make_array(0, 3, 0, 1, 2, 3, -2, -2));
+ TEST_REGEX_SEARCH("^(a|b|c)=((?1))+", perl|icase, "a=bc", match_default, make_array(0, 4, 0, 1, 3, 4, -2, -2));
+ TEST_REGEX_SEARCH("^(?1)(abc)", perl|icase, "abcabc", match_default, make_array(0, 6, 3, 6, -2, -2));
+ TEST_REGEX_SEARCH("(?1)X(?<abc>P)", perl|icase, "abcPXP123", match_default, make_array(3, 6, 5, 6, -2, -2));
+ TEST_REGEX_SEARCH("(abc)(?i:(?1))", perl|icase, "defabcabcxyz", match_default, make_array(3, 9, 3, 6, -2, -2));
+ TEST_REGEX_SEARCH("(abc)(?i:(?1))", perl, "DEFabcABCXYZ", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(abc)(?i:(?1)abc)", perl, "DEFabcABCABCXYZ", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(abc)(?:(?i)(?1))", perl, "defabcabcxyz", match_default, make_array(3, 9, 3, 6, -2, -2));
+ TEST_REGEX_SEARCH("(abc)(?:(?i)(?1))", perl, "DEFabcABCXYZ", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))(?1)", perl, "abcabc", match_default, make_array(0, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))(?1)", perl, "xyzabc", match_default, make_array(0, 6, 0, 3, -2, -2));
+ TEST_REGEX_SEARCH("(?|(abc)|(xyz))(?1)", perl, "xyzxyz", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?1)[]a()b](abc)", perl, "abcbabc", match_default, make_array(0, 7, 4, 7, -2, -2));
+ TEST_REGEX_SEARCH("(?1)[]a()b](abc)", perl, "abcXabc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?1)[^]a()b](abc)", perl, "abcXabc", match_default, make_array(0, 7, 4, 7, -2, -2));
+ TEST_REGEX_SEARCH("(?1)[^]a()b](abc)", perl, "abcbabc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?2)[]a()b](abc)(xyz)", perl, "xyzbabcxyz", match_default, make_array(0, 10, 4, 7, 7, 10, -2, -2));
+ TEST_REGEX_SEARCH("^X(?5)(a)(?|(b)|(q))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_INVALID_REGEX("^X(?5)(a)(?|(b)|(q))(c)(d)Y", perl);
+ TEST_REGEX_SEARCH("^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, -1, -1, -1, -1, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_REGEX_SEARCH("^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, -1, -1, -1, -1, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_REGEX_SEARCH("^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)", perl, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, -1, -1, -1, -1, 4, 5, 5, 6, 6, 7, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"1234", match_default, make_array(0, 4, 0, 4, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"\"1234\"", match_default, make_array(0, 6, 0, 6, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"\x100"L"1234", match_default, make_array(0, 5, 1, 5, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"\"\x100"L"1234\"", match_default, make_array(1, 6, 2, 6, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"\x100\x100"L"12ab", match_default, make_array(0, 4, 2, 4, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"\x100\x100"L"\"12\"", match_default, make_array(0, 6, 2, 6, -2, -2));
+ TEST_REGEX_SEARCH_W(L"\\x{100}*(\\d+|\"(?1)\")", perl, L"\x100\x100"L"abcd", match_default, make_array(-2, -2));
+
+ TEST_REGEX_SEARCH("(ab|c)(?-1)", perl, "abc", match_default, make_array(0, 3, 0, 2, -2, -2));
+ TEST_REGEX_SEARCH("xy(?+1)(abc)", perl, "xyabcabc", match_default, make_array(0, 8, 5, 8, -2, -2));
+ TEST_REGEX_SEARCH("xy(?+1)(abc)", perl, "xyabc", match_default, make_array(-2, -2));
+ TEST_INVALID_REGEX("x(?-0)y", perl);
+ TEST_INVALID_REGEX("x(?-1)y", perl);
+ TEST_INVALID_REGEX("x(?+0)y", perl);
+ TEST_INVALID_REGEX("x(?+1)y", perl);
+ TEST_REGEX_SEARCH("^(?+1)(?<a>x|y){0}z", perl, "xzxx", match_default, make_array(0, 2, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("^(?+1)(?<a>x|y){0}z", perl, "yzyy", match_default, make_array(0, 2, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("^(?+1)(?<a>x|y){0}z", perl, "xxz", match_default, make_array(-2, -2));
+
+ // Now recurse to sub-expression zero:
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "(abcd)", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "(abcd)xyz", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "xyz(abcd)", match_default, make_array(3, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "(ab(xy)cd)pqr", match_default, make_array(0, 10, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "(ab(xycd)pqr", match_default, make_array(3, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "() abc ()", match_default, make_array(0, 2, -2, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "12(abcde(fsh)xyz(foo(bar))lmno)89", match_default, make_array(2, 31, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "abcd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "abcd)", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?0))*\\)", perl, "(abcd", match_default, make_array(-2, -2));
+
+ TEST_REGEX_SEARCH("\\( ( (?>[^()]+) | (?0) )* \\) ", perl|mod_x, "(ab(xy)cd)pqr", match_default, make_array(0, 10, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (?>[^()]+) | (?0) )* \\) ", perl|mod_x, "1(abcd)(x(y)z)pqr", match_default, make_array(1, 7, 2, 6, -2, 7, 14, 12, 13, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) ) \\) ", perl|mod_x, "(abcd)", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(3, 7, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) ) \\) ", perl|mod_x, "(a(b(c)d)e)", match_default, make_array(4, 7, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) ) \\) ", perl|mod_x, "((ab))", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) ) \\) ", perl|mod_x, "()", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) )? \\) ", perl|mod_x, "()", match_default, make_array(0, 2, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?0) )? \\) ", perl|mod_x, "12(abcde(fsh)xyz(foo(bar))lmno)89", match_default, make_array(8, 13, -2, 20, 25, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (?>[^()]+) | (?0) )* \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()]+) | (?0) )* ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 1, 9, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( (123)? ( ( (?>[^()]+) | (?0) )* ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, -1, -1, 1, 9, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( (123)? ( ( (?>[^()]+) | (?0) )* ) \\) ", perl|mod_x, "(123ab(xy)cd)", match_default, make_array(0, 13, 1, 4, 4, 12, 10, 12, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (123)? ( (?>[^()]+) | (?0) )* ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 1, 9, -1, -1, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (123)? ( (?>[^()]+) | (?0) )* ) \\) ", perl|mod_x, "(123ab(xy)cd)", match_default, make_array(0, 13, 1, 12, 1, 4, 10, 12, -2, -2));
+ TEST_REGEX_SEARCH("\\( (((((((((( ( (?>[^()]+) | (?0) )* )))))))))) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?0) )* ) \\) ", perl|mod_x, "(abcd(xyz<p>qrs)123)", match_default, make_array(0, 20, 1, 19, 16, 19, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()]+) | ((?0)) )* ) \\) ", perl|mod_x, "(ab(cd)ef)", match_default, make_array(0, 10, 1, 9, 7, 9, 3, 7, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()]+) | ((?0)) )* ) \\) ", perl|mod_x, "(ab(cd(ef)gh)ij)", match_default, make_array(0, 16, 1, 15, 13, 15, 3, 13, -2, -2));
+ // Again with (?R):
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "(abcd)", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "(abcd)xyz", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "xyz(abcd)", match_default, make_array(3, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "(ab(xy)cd)pqr", match_default, make_array(0, 10, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "(ab(xycd)pqr", match_default, make_array(3, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "() abc ()", match_default, make_array(0, 2, -2, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "12(abcde(fsh)xyz(foo(bar))lmno)89", match_default, make_array(2, 31, -2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "abcd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "abcd)", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\((?:(?>[^()]+)|(?R))*\\)", perl, "(abcd", match_default, make_array(-2, -2));
+
+ TEST_REGEX_SEARCH("\\( ( (?>[^()]+) | (?R) )* \\) ", perl|mod_x, "(ab(xy)cd)pqr", match_default, make_array(0, 10, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (?>[^()]+) | (?R) )* \\) ", perl|mod_x, "1(abcd)(x(y)z)pqr", match_default, make_array(1, 7, 2, 6, -2, 7, 14, 12, 13, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) ) \\) ", perl|mod_x, "(abcd)", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(3, 7, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) ) \\) ", perl|mod_x, "(a(b(c)d)e)", match_default, make_array(4, 7, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) ) \\) ", perl|mod_x, "((ab))", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) ) \\) ", perl|mod_x, "()", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) )? \\) ", perl|mod_x, "()", match_default, make_array(0, 2, -2, -2));
+ TEST_REGEX_SEARCH("\\( (?: (?>[^()]+) | (?R) )? \\) ", perl|mod_x, "12(abcde(fsh)xyz(foo(bar))lmno)89", match_default, make_array(8, 13, -2, 20, 25, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (?>[^()]+) | (?R) )* \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()]+) | (?R) )* ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 1, 9, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( (123)? ( ( (?>[^()]+) | (?R) )* ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, -1, -1, 1, 9, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( (123)? ( ( (?>[^()]+) | (?R) )* ) \\) ", perl|mod_x, "(123ab(xy)cd)", match_default, make_array(0, 13, 1, 4, 4, 12, 10, 12, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (123)? ( (?>[^()]+) | (?R) )* ) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 1, 9, -1, -1, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( (123)? ( (?>[^()]+) | (?R) )* ) \\) ", perl|mod_x, "(123ab(xy)cd)", match_default, make_array(0, 13, 1, 12, 1, 4, 10, 12, -2, -2));
+ TEST_REGEX_SEARCH("\\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \\) ", perl|mod_x, "(ab(xy)cd)", match_default, make_array(0, 10, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 7, 9, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \\) ", perl|mod_x, "(abcd(xyz<p>qrs)123)", match_default, make_array(0, 20, 1, 19, 16, 19, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()]+) | ((?R)) )* ) \\) ", perl|mod_x, "(ab(cd)ef)", match_default, make_array(0, 10, 1, 9, 7, 9, 3, 7, -2, -2));
+ TEST_REGEX_SEARCH("\\( ( ( (?>[^()]+) | ((?R)) )* ) \\) ", perl|mod_x, "(ab(cd(ef)gh)ij)", match_default, make_array(0, 16, 1, 15, 13, 15, 3, 13, -2, -2));
+ // And some extra cases:
+ TEST_REGEX_SEARCH("x(ab|(bc|(de|(?R))))", perl|mod_x, "xab", match_default, make_array(0, 3, 1, 3, -1, -1, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("x(ab|(bc|(de|(?R))))", perl|mod_x, "xbc", match_default, make_array(0, 3, 1, 3, 1, 3, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("x(ab|(bc|(de|(?R))))", perl|mod_x, "xde", match_default, make_array(0, 3, 1, 3, 1, 3, 1, 3, -2, -2));
+ TEST_REGEX_SEARCH("x(ab|(bc|(de|(?R))))", perl|mod_x, "xxab", match_default, make_array(0, 4, 1, 4, 1, 4, 1, 4, -2, -2));
+ TEST_REGEX_SEARCH("x(ab|(bc|(de|(?R))))", perl|mod_x, "xxxab", match_default, make_array(0, 5, 1, 5, 1, 5, 1, 5, -2, -2));
+ TEST_REGEX_SEARCH("x(ab|(bc|(de|(?R))))", perl|mod_x, "xyab", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("[^()]*(?:\\((?R)\\)[^()]*)*", perl|mod_x, "(this(and)that)", match_default, make_array(0, 15, -2, 15, 15, -2, -2));
+ TEST_REGEX_SEARCH("[^()]*(?:\\((?R)\\)[^()]*)*", perl|mod_x, "(this(and)that)stuff", match_default, make_array(0, 20, -2, 20, 20, -2, -2));
+ TEST_REGEX_SEARCH("[^()]*(?:\\((?>(?R))\\)[^()]*)*", perl|mod_x, "(this(and)that)", match_default, make_array(0, 15, -2, 15, 15, -2, -2));
+
+ // More complex cases involving (?(R):
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<>", match_default, make_array(0, 2, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abcd>", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc <123> hij>", match_default, make_array(0, 15, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc <def> hij>", match_default, make_array(5, 10, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc<>def>", match_default, make_array(0, 10, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc<>", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) ", perl|mod_x, "abcabc1Xabc2XabcXabcabc", match_default, make_array(0, 17, 0, 17, 0, 17, -2, -2));
+
+ // Recursion to named sub-expressions:
+ //TEST_REGEX_SEARCH("^\\W*(?:(?<one>(?<two>.)\\W*(?&one)\\W*\\k<two>|)|(?<three>(?<four>.)\\W*(?&three)\\W*\\k'four'|\\W*.\\W*))\\W*$", perl|mod_x|icase, "Satan, oscillate my metallic sonatas!", match_default, make_array(0, 37, -1, -1, -1, -1, 0, 36, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("(?'abc'a|b)(?<doe>d|e)(?&abc){2}", perl|mod_x, "bdaa", match_default, make_array(0, 4, 0, 1, 1, 2, -2, -2));
+ TEST_REGEX_SEARCH("(?'abc'a|b)(?<doe>d|e)(?&abc){2}", perl|mod_x, "bdab", match_default, make_array(0, 4, 0, 1, 1, 2, -2, -2));
+ TEST_REGEX_SEARCH("(?'abc'a|b)(?<doe>d|e)(?&abc){2}", perl|mod_x, "bddd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?&abc)X(?<abc>P)", perl|mod_x, "abcPXP123", match_default, make_array(3, 6, 5, 6, -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?&abc)b)*(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?&abc)b){1,5}(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?&abc)b){2,5}(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?&abc)b){2,}(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_INVALID_REGEX("(?<a>)(?&)", perl|mod_x);
+ TEST_INVALID_REGEX("(?<abc>)(?&a)", perl|mod_x);
+ TEST_INVALID_REGEX("(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)", perl|mod_x);
+ TEST_INVALID_REGEX("(?&N)[]a(?<N>)](?<M>abc)", perl|mod_x);
+ TEST_INVALID_REGEX("(?&N)[]a(?<N>)](abc)", perl|mod_x);
+ TEST_INVALID_REGEX("(?&N)[]a(?<N>)](abc)", perl|mod_x);
+ TEST_REGEX_SEARCH("^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)", perl|mod_x, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, -2, -2));
+ // And again with (?P> :
+ //TEST_REGEX_SEARCH("^\\W*(?:(?<one>(?<two>.)\\W*(?&one)\\W*\\k<two>|)|(?<three>(?<four>.)\\W*(?&three)\\W*\\k'four'|\\W*.\\W*))\\W*$", perl|mod_x|icase, "Satan, oscillate my metallic sonatas!", match_default, make_array(0, 37, -1, -1, -1, -1, 0, 36, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("(?'abc'a|b)(?<doe>d|e)(?P>abc){2}", perl|mod_x, "bdaa", match_default, make_array(0, 4, 0, 1, 1, 2, -2, -2));
+ TEST_REGEX_SEARCH("(?'abc'a|b)(?<doe>d|e)(?P>abc){2}", perl|mod_x, "bdab", match_default, make_array(0, 4, 0, 1, 1, 2, -2, -2));
+ TEST_REGEX_SEARCH("(?'abc'a|b)(?<doe>d|e)(?P>abc){2}", perl|mod_x, "bddd", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?P>abc)X(?<abc>P)", perl|mod_x, "abcPXP123", match_default, make_array(3, 6, 5, 6, -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?P>abc)b)*(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?P>abc)b){1,5}(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?P>abc)b){2,5}(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_REGEX_SEARCH("(?:a(?P>abc)b){2,}(?<abc>x)", perl|mod_x, "123axbaxbaxbx456", match_default, make_array(3, 13, 12, 13 , -2, -2));
+ TEST_INVALID_REGEX("(?<a>)(?P>)", perl|mod_x);
+ TEST_INVALID_REGEX("(?<abc>)(?P>a)", perl|mod_x);
+ TEST_INVALID_REGEX("(?<a>)(?P>aaaaaaaaaaaaaaaaaaaaaaa)", perl|mod_x);
+ TEST_INVALID_REGEX("(?P>N)[]a(?<N>)](?<M>abc)", perl|mod_x);
+ TEST_INVALID_REGEX("(?P>N)[]a(?<N>)](abc)", perl|mod_x);
+ TEST_INVALID_REGEX("(?P>N)[]a(?<N>)](abc)", perl|mod_x);
+ TEST_REGEX_SEARCH("^X(?P>N)(a)(?|(b)|(q))(c)(d)(?<N>Y)", perl|mod_x, "XYabcdY", match_default, make_array(0, 7, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, -2, -2));
+ // Now check (?(R&NAME) :
+ TEST_REGEX_SEARCH("(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) ", perl|mod_x, "abcabc1Xabc2XabcXabcabc", match_default, make_array(0, 17, 0, 17, 0, 17, -2, -2));
+ TEST_INVALID_REGEX("(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) ", perl|mod_x);
+ TEST_REGEX_SEARCH("(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) ", perl|mod_x, "abcabc1Xabc2XabcXabcabc", match_default, make_array(0, 17, 0, 17, 0, 17, -2, -2));
+
+ // Now check for named conditionals:
+ TEST_REGEX_SEARCH("^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)", perl|mod_x, "abd", match_default, make_array(0, 3, 0, 1, -2, -2));
+ TEST_REGEX_SEARCH("^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)", perl|mod_x, "ce", match_default, make_array(0, 2, -1, -1, -2, -2));
+
+ // Recursions in combination with (DEFINE):
+ TEST_REGEX_SEARCH("^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) ", perl|mod_x, "abcd", match_default, make_array(0, 2, -1, -1, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("(?<NAME>(?&NAME_PAT))\\s+(?<ADDR>(?&ADDRESS_PAT)) (?(DEFINE) (?<NAME_PAT>[a-z]+) (?<ADDRESS_PAT>\\d+))", perl|mod_x, "metcalfe 33", match_default, make_array(0, 11, 0, 8, 9, 11, -1, -1, -1, -1, -2, -2));
+ TEST_INVALID_REGEX("^(?(DEFINE) abc | xyz ) ", perl|mod_x);
+ //TEST_INVALID_REGEX("(?(DEFINE) abc){3} xyz", perl|mod_x);
+ TEST_REGEX_SEARCH("(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}", perl|mod_x, "1.2.3.4", match_default, make_array(0, 7, -1, -1, 5, 7, -2, -2));
+ TEST_REGEX_SEARCH("(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}", perl|mod_x, "131.111.10.206", match_default, make_array(0, 14, -1, -1, 10, 14, -2, -2));
+ TEST_REGEX_SEARCH("(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}", perl|mod_x, "10.0.0.0", match_default, make_array(0, 8, -1, -1, 6, 8, -2, -2));
+ TEST_REGEX_SEARCH("(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}", perl|mod_x, "10.6", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}", perl|mod_x, "455.3.4.5", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))", perl|mod_x, "1.2.3.4", match_default, make_array(0, 7, 5, 7, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))", perl|mod_x, "131.111.10.206", match_default, make_array(0, 14, 10, 14, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))", perl|mod_x, "10.0.0.0", match_default, make_array(0, 8, 6, 8, -1, -1, -2, -2));
+ TEST_REGEX_SEARCH("\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))", perl|mod_x, "10.6", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))", perl|mod_x, "455.3.4.5", match_default, make_array(-2, -2));
+}
+

Modified: branches/release/libs/regex/test/regress/test_replace.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_replace.cpp (original)
+++ branches/release/libs/regex/test/regress/test_replace.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -88,6 +88,16 @@
    TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "?1A:B", "...AB,,,AB*AB?");
    TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "(?1A:B)C", "...ACBC,,,ACBC*ACBC?");
    TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "?1:B", "...B,,,B*B?");
+
+ TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "(?{1}A)(?{2}B)", "...AB,,,AB*AB?");
+ TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "?{1}A:B", "...AB,,,AB*AB?");
+ TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "(?{1}A:B)C", "...ACBC,,,ACBC*ACBC?");
+ TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "?{1}:B", "...B,,,B*B?");
+ TEST_REGEX_REPLACE("(?<one>a+)|(?<two>b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "(?{one}A)(?{two}B)", "...AB,,,AB*AB?");
+ TEST_REGEX_REPLACE("(?<one>a+)|(?<two>b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "?{one}A:B", "...AB,,,AB*AB?");
+ TEST_REGEX_REPLACE("(?<one>a+)|(?<two>b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "(?{one}A:B)C", "...ACBC,,,ACBC*ACBC?");
+ TEST_REGEX_REPLACE("(?<one>a+)|(?<two>b+)", perl, "...aaabb,,,ab*abbb?", match_default|format_all, "?{one}:B", "...B,,,B*B?");
+
    // move to copying unmatched data, but replace first occurance only:
    TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_all|format_first_only, "bbb", "...bbb,,,");
    TEST_REGEX_REPLACE("a+(b+)", perl, "...aaabb,,,", match_default|format_all|format_first_only, "$1", "...bb,,,");
@@ -126,5 +136,53 @@
    TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default, "/${10}/", "...//,,,");
    TEST_REGEX_REPLACE("((((((((((a+))))))))))", perl, "...aaa,,,", match_default, "/${10}/", ".../aaa/,,,");
    TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default, "/${1}0/", ".../aaa0/,,,");
+
+ // New Perl style operators:
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$MATCH", "aaa");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${MATCH}", "aaa");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${^MATCH}", "aaa");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$MATC", "$MATC");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${MATCH", "${MATCH");
+
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$PREMATCH", "...");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${PREMATCH}", "...");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${^PREMATCH}", "...");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$PREMATC", "$PREMATC");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${PREMATCH", "${PREMATCH");
+
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$POSTMATCH", ",,,");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${POSTMATCH}", ",,,");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${^POSTMATCH}", ",,,");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$POSTMATC", "$POSTMATC");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "${POSTMATCH", "${POSTMATCH");
+
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_PAREN_MATCH", "");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_PAREN_MATC", "$LAST_PAREN_MATC");
+ TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_PAREN_MATCH", "aaa");
+ TEST_REGEX_REPLACE("(a+)(b+)", perl, "...aaabb,,,", match_default|format_no_copy, "$LAST_PAREN_MATCH", "bb");
+
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$+", "");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$+foo", "foo");
+ TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default|format_no_copy, "$+", "aaa");
+ TEST_REGEX_REPLACE("(a+)(b+)", perl, "...aaabb,,,", match_default|format_no_copy, "$+foo", "bbfoo");
+ TEST_REGEX_REPLACE("(a+)(b+)", perl, "...aaabb,,,", match_default|format_no_copy, "$+{", "bb{");
+ TEST_REGEX_REPLACE("(a+)(b+)", perl, "...aaabb,,,", match_default|format_no_copy, "$+{foo", "bb{foo");
+
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_SUBMATCH_RESULT", "");
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_SUBMATCH_RESUL", "$LAST_SUBMATCH_RESUL");
+ TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_SUBMATCH_RESULT", "aaa");
+ TEST_REGEX_REPLACE("(a+)(b+)", perl, "...aaabb,,,", match_default|format_no_copy, "$LAST_SUBMATCH_RESULT", "bb");
+ TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaa,,,", match_default|format_no_copy, "$LAST_SUBMATCH_RESULT", "aaa");
+
+ TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default|format_no_copy, "$^N", "");
+ TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default|format_no_copy, "$^N", "aaa");
+ TEST_REGEX_REPLACE("(a+)(b+)", perl, "...aaabb,,,", match_default|format_no_copy, "$^N", "bb");
+ TEST_REGEX_REPLACE("(a+)|(b+)", perl, "...aaa,,,", match_default|format_no_copy, "$^N", "aaa");
+
+ TEST_REGEX_REPLACE("(?<one>a+)(?<two>b+)", perl, " ...aabb,,", match_default|format_no_copy, "$&", "aabb");
+ TEST_REGEX_REPLACE("(?<one>a+)(?<two>b+)", perl, " ...aabb,,", match_default|format_no_copy, "$1", "aa");
+ TEST_REGEX_REPLACE("(?<one>a+)(?<two>b+)", perl, " ...aabb,,", match_default|format_no_copy, "$2", "bb");
+ TEST_REGEX_REPLACE("(?<one>a+)(?<two>b+)", perl, " ...aabb,,", match_default|format_no_copy, "d$+{one}c", "daac");
+ TEST_REGEX_REPLACE("(?<one>a+)(?<two>b+)", perl, " ...aabb,,", match_default|format_no_copy, "c$+{two}d", "cbbd");
 }
 

Modified: branches/release/libs/regex/test/regress/test_sets.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_sets.cpp (original)
+++ branches/release/libs/regex/test/regress/test_sets.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -266,6 +266,10 @@
    TEST_REGEX_SEARCH("[\\W]+", perl, "AB_ AB", match_default, make_array(3, 6, -2, -2));
    TEST_REGEX_SEARCH("[[:^word:]]+", perl, "AB_ AB", match_default, make_array(3, 6, -2, -2));
    TEST_REGEX_SEARCH("\\W+", perl, "AB_ AB", match_default, make_array(3, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\h+", perl, "\v\f\r\n \t\n", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\V+", perl, "\v\f\r\n \t\n", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\H+", perl, " \t\v\f\r\n ", match_default, make_array(2, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\v+", perl, " \t\v\f\r\n ", match_default, make_array(2, 6, -2, -2));
    test_sets2c();
 }
 

Modified: branches/release/libs/regex/test/regress/test_simple_repeats.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_simple_repeats.cpp (original)
+++ branches/release/libs/regex/test/regress/test_simple_repeats.cpp 2009-08-03 08:00:07 EDT (Mon, 03 Aug 2009)
@@ -436,3 +436,44 @@
 
 }
 
+void test_pocessive_repeats()
+{
+ using namespace boost::regex_constants;
+ // and again for sets:
+ TEST_REGEX_SEARCH("^(\\w++|\\s++)*$", perl, "now is the time for all good men to come to the aid of the party", match_default, make_array(0, 64, 59, 64, -2, -2));
+ TEST_REGEX_SEARCH("^(\\w++|\\s++)*$", perl, "this is not a line with only words and spaces!", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(\\d++)(\\w)", perl, "12345a", match_default, make_array(0, 6, 0, 5, 5, 6, -2, -2));
+ TEST_REGEX_SEARCH("(\\d++)(\\w)", perl, "12345+", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(\\d++)(\\w)", perl, "12345", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a++b", perl, "aaab", match_default, make_array(0, 4, -2, -2));
+ TEST_REGEX_SEARCH("(a++b)", perl, "aaab", match_default, make_array(0, 4, 0, 4, -2, -2));
+ TEST_REGEX_SEARCH("([^()]++|\\([^()]*\\))+", perl, "((abc(ade)ufh()()x", match_default, make_array(2, 18, 17, 18, -2, -2));
+ TEST_REGEX_SEARCH("\\(([^()]++|\\([^()]+\\))+\\)", perl, "(abc)", match_default, make_array(0, 5, 1, 4, -2, -2));
+ TEST_REGEX_SEARCH("\\(([^()]++|\\([^()]+\\))+\\)", perl, "(abc(def)xyz)", match_default, make_array(0, 13, 9, 12, -2, -2));
+ TEST_REGEX_SEARCH("\\(([^()]++|\\([^()]+\\))+\\)", perl, "((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", match_default, make_array(-2, -2));
+ /*
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<>", match_default, make_array(0, 2, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abcd>", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc <123> hij>", match_default, make_array(0, 15, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc <def> hij>", match_default, make_array(5, 10, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc<>def>", match_default, make_array(0, 10, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc<>", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<abc", match_default, make_array(-2, -2));
+
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<>", match_default, make_array(0, 2, 0, 2, 0, 2, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<abcd>", match_default, make_array(0, 6, 0, 6, 0, 6, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<abc <123> hij>", match_default, make_array(0, 15, 0, 15, 0, 15, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<abc <def> hij>", match_default, make_array(5, 10, 5, 10, 5, 10, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<abc<>def>", match_default, make_array(0, 10, 0, 10, 0, 10, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<abc<>", match_default, make_array(4, 6, 4, 6, 4, 6, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "<abc", match_default, make_array(-2, -2));
+ */
+ TEST_REGEX_SEARCH("x*+\\w", perl, "xxxxx", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("x*+\\w", perl, "xxxxxa", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("x{1,6}+\\w", perl, "xxxxx", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("x{1,6}+\\w", perl, "xxxxxa", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("x{1,5}+\\w", perl, "xxxxxa", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("x{1,4}+\\w", perl, "xxxxxa", match_default, make_array(0, 5, -2, -2));
+ TEST_REGEX_SEARCH("x{1,3}+\\w", perl, "xxxxxa", match_default, make_array(0, 4, -2, 4, 6, -2, -2));
+}
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk