$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r54994 - in trunk: boost/regex/v4 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/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/icu libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings libs/regex/doc/html/boost_regex/syntax libs/regex/test/regress
From: john_at_[hidden]
Date: 2009-07-17 06:23:58
Author: johnmaddock
Date: 2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
New Revision: 54994
URL: http://svn.boost.org/trac/boost/changeset/54994
Log:
Added initial support for recursive expressions.
Updated docs and tests accordingly.
Text files modified: 
   trunk/boost/regex/v4/basic_regex.hpp                                                |     1                                         
   trunk/boost/regex/v4/basic_regex_creator.hpp                                        |    78 +++++++++++++                           
   trunk/boost/regex/v4/basic_regex_parser.hpp                                         |   113 +++++++++++++++++++                     
   trunk/boost/regex/v4/perl_matcher.hpp                                               |    26 ++++                                    
   trunk/boost/regex/v4/perl_matcher_common.hpp                                        |    65 ++--------                              
   trunk/boost/regex/v4/perl_matcher_non_recursive.hpp                                 |   228 +++++++++++++++++++++++++++++++++++++++ 
   trunk/boost/regex/v4/perl_matcher_recursive.hpp                                     |   125 +++++++++++++++++++++                   
   trunk/boost/regex/v4/states.hpp                                                     |     5                                         
   trunk/libs/regex/doc/html/boost_regex/background_information/examples.html          |     6                                         
   trunk/libs/regex/doc/html/boost_regex/background_information/history.html           |    12 +-                                      
   trunk/libs/regex/doc/html/boost_regex/background_information/locale.html            |     8                                         
   trunk/libs/regex/doc/html/boost_regex/background_information/standards.html         |    10                                         
   trunk/libs/regex/doc/html/boost_regex/captures.html                                 |     6                                         
   trunk/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html               |     8                                         
   trunk/libs/regex/doc/html/boost_regex/install.html                                  |    16 +-                                      
   trunk/libs/regex/doc/html/boost_regex/ref/bad_expression.html                       |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/basic_regex.html                          |    18 +-                                      
   trunk/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html              |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html   |     2                                         
   trunk/libs/regex/doc/html/boost_regex/ref/error_type.html                           |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/match_flag_type.html                      |     2                                         
   trunk/libs/regex/doc/html/boost_regex/ref/match_results.html                        |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html     |     6                                         
   trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html     |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html |    10                                         
   trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/posix.html                                |     8                                         
   trunk/libs/regex/doc/html/boost_regex/ref/regex_iterator.html                       |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/regex_match.html                          |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/regex_replace.html                        |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/regex_search.html                         |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html                 |     4                                         
   trunk/libs/regex/doc/html/boost_regex/ref/regex_traits.html                         |     2                                         
   trunk/libs/regex/doc/html/boost_regex/ref/sub_match.html                            |     8                                         
   trunk/libs/regex/doc/html/boost_regex/syntax/basic_extended.html                    |    66 +++++-----                              
   trunk/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html                      |    44 +++---                                  
   trunk/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html                       |   147 +++++++++++++++++--------               
   trunk/libs/regex/doc/html/boost_regex/unicode.html                                  |     4                                         
   trunk/libs/regex/doc/html/index.html                                                |     4                                         
   trunk/libs/regex/doc/syntax_perl.qbk                                                |    27 ++++                                    
   trunk/libs/regex/test/regress/main.cpp                                              |     1                                         
   trunk/libs/regex/test/regress/test.hpp                                              |     1                                         
   trunk/libs/regex/test/regress/test_non_greedy_repeats.cpp                           |     1                                         
   trunk/libs/regex/test/regress/test_perl_ex.cpp                                      |   175 +++++++++++++++++++++++++++++-          
   44 files changed, 1013 insertions(+), 264 deletions(-)
Modified: trunk/boost/regex/v4/basic_regex.hpp
==============================================================================
--- trunk/boost/regex/v4/basic_regex.hpp	(original)
+++ trunk/boost/regex/v4/basic_regex.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -194,6 +194,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
Modified: trunk/boost/regex/v4/basic_regex_creator.hpp
==============================================================================
--- trunk/boost/regex/v4/basic_regex_creator.hpp	(original)
+++ trunk/boost/regex/v4/basic_regex_creator.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 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,65 @@
 }
 
 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_recurse:
+         {
+            bool ok = false;
+            re_syntax_base* p = base;
+            /*
+            if(static_cast<re_jump*>(state)->alt.i == 0)
+            {
+               ok = true;
+               static_cast<re_jump*>(state)->alt.p = p;
+            }
+            else
+            {*/
+               while(p)
+               {
+                  if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == static_cast<re_jump*>(state)->alt.i))
+                  {
+                     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 +1028,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: trunk/boost/regex/v4/basic_regex_parser.hpp
==============================================================================
--- trunk/boost/regex/v4/basic_regex_parser.hpp	(original)
+++ trunk/boost/regex/v4/basic_regex_parser.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -125,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;
@@ -387,6 +395,7 @@
    }
    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;
@@ -399,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 ')' :
    //
@@ -423,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)
@@ -444,6 +462,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:
@@ -729,6 +748,7 @@
       {
          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;
@@ -795,6 +815,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
          {
@@ -946,11 +967,13 @@
    {
       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;
 }
@@ -1706,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
    {
@@ -1793,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;
@@ -1806,6 +1831,7 @@
    charT name_delim;
    int mark_reset = m_mark_reset;
    m_mark_reset = -1;
+   int v;
    //
    // select the actual extension used:
    //
@@ -1821,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;
@@ -1882,7 +1959,24 @@
          return false;
       }
       int v = this->m_traits.toi(m_position, m_end, 10);
-      if(v > 0)
+      if(*m_position == charT('R'))
+      {
+         ++m_position;
+         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(v > 0)
       {
          re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
          br->index = v;
@@ -1976,9 +2070,21 @@
       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;
+      }
       //
       // 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;
@@ -2095,6 +2201,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:
Modified: trunk/boost/regex/v4/perl_matcher.hpp
==============================================================================
--- trunk/boost/regex/v4/perl_matcher.hpp	(original)
+++ trunk/boost/regex/v4/perl_matcher.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 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);
    }
@@ -413,6 +426,7 @@
 #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();
@@ -468,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
    //
@@ -491,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();
@@ -499,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: trunk/boost/regex/v4/perl_matcher_common.hpp
==============================================================================
--- trunk/boost/regex/v4/perl_matcher_common.hpp	(original)
+++ trunk/boost/regex/v4/perl_matcher_common.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -346,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;
@@ -465,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
@@ -760,8 +712,21 @@
 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 > 0)
+   {
+      // 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.
+      result = recursion_stack_position && ((recursion_stack[recursion_stack_position-1].id == -index-1) || (index == 0));
+      pstate = pstate->next.p;
+   }
    return result;
 }
 
Modified: trunk/boost/regex/v4/perl_matcher_non_recursive.hpp
==============================================================================
--- trunk/boost/regex/v4/perl_matcher_non_recursive.hpp	(original)
+++ trunk/boost/regex/v4/perl_matcher_non_recursive.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 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,
@@ -165,6 +176,7 @@
       &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();
@@ -317,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:
@@ -859,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
@@ -869,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,
@@ -885,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;
@@ -1388,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: trunk/boost/regex/v4/perl_matcher_recursive.hpp
==============================================================================
--- trunk/boost/regex/v4/perl_matcher_recursive.hpp	(original)
+++ trunk/boost/regex/v4/perl_matcher_recursive.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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,
@@ -95,6 +95,7 @@
       &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)
@@ -117,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)
    {
@@ -848,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: trunk/boost/regex/v4/states.hpp
==============================================================================
--- trunk/boost/regex/v4/states.hpp	(original)
+++ trunk/boost/regex/v4/states.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 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: trunk/libs/regex/doc/html/boost_regex/background_information/examples.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/background_information/examples.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/background_information/examples.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -28,7 +28,7 @@
       Example Programs</a>
 </h3></div></div></div>
 <a name="boost_regex.background_information.examples.test_programs"></a><h5>
-<a name="id803018"></a>
+<a name="id845779"></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="id803321"></a>
+<a name="id846083"></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="id803380"></a>
+<a name="id846142"></a>
         <a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
         snippets</a>
       </h5>
Modified: trunk/libs/regex/doc/html/boost_regex/background_information/history.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/background_information/history.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/background_information/history.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -26,7 +26,7 @@
 <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_38"></a><h5>
-<a name="id805061"></a>
+<a name="id847806"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_38">Boost
         1.38</a>
       </h5>
@@ -53,7 +53,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_34"></a><h5>
-<a name="id805139"></a>
+<a name="id847884"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
         1.34</a>
       </h5>
@@ -76,7 +76,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
-<a name="id805170"></a>
+<a name="id847915"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
         1.33.1</a>
       </h5>
@@ -146,7 +146,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
-<a name="id805249"></a>
+<a name="id847994"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
         1.33.0</a>
       </h5>
@@ -201,7 +201,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
-<a name="id805308"></a>
+<a name="id848053"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
         1.32.1</a>
       </h5>
@@ -209,7 +209,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="id805328"></a>
+<a name="id848074"></a>
         <a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
         1.31.0</a>
       </h5>
Modified: trunk/libs/regex/doc/html/boost_regex/background_information/locale.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/background_information/locale.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/background_information/locale.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id798806"></a>
+<a name="id841579"></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="id798960"></a>
+<a name="id841734"></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="id799029"></a>
+<a name="id841802"></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"><</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">></span></code>.
       </p>
 <a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
-<a name="id799330"></a>
+<a name="id842104"></a>
         <a class="link" href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
         a message catalogue</a>
       </h5>
Modified: trunk/libs/regex/doc/html/boost_regex/background_information/standards.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/background_information/standards.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/background_information/standards.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -28,7 +28,7 @@
       Conformance</a>
 </h3></div></div></div>
 <a name="boost_regex.background_information.standards.c__"></a><h5>
-<a name="id804009"></a>
+<a name="id846771"></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="id804031"></a>
+<a name="id846968"></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="id804051"></a>
+<a name="id846989"></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="id804075"></a>
+<a name="id847013"></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="id804099"></a>
+<a name="id847037"></a>
         <a class="link" href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/captures.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/captures.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/captures.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -35,7 +35,7 @@
       accessed.
     </p>
 <a name="boost_regex.captures.marked_sub_expressions"></a><h5>
-<a name="id646833"></a>
+<a name="id689432"></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="id647289"></a>
+<a name="id689888"></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="id647329"></a>
+<a name="id689927"></a>
       <a class="link" href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
     </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -32,7 +32,7 @@
         '$', '\', '(', ')', '?', and ':'.
       </p>
 <a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
-<a name="id667534"></a>
+<a name="id710308"></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="id667551"></a>
+<a name="id710325"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
       </h5>
 <p>
@@ -79,7 +79,7 @@
         ?{NAME}true-expression:false-expression
       </p>
 <a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
-<a name="id667604"></a>
+<a name="id710377"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
         Sequences</a>
       </h5>
@@ -319,7 +319,7 @@
         as a literal.
       </p>
 <a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
-<a name="id667947"></a>
+<a name="id710721"></a>
         <a class="link" href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
         Sequences</a>
       </h5>
Modified: trunk/libs/regex/doc/html/boost_regex/install.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/install.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/install.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id637933"></a>
+<a name="id680532"></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="id637957"></a>
+<a name="id680556"></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="id638076"></a>
+<a name="id680674"></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="id638089"></a>
+<a name="id680688"></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="id638328"></a>
+<a name="id680926"></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="id645234"></a>
+<a name="id687832"></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="id645360"></a>
+<a name="id687958"></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="id645504"></a>
+<a name="id688102"></a>
       <a class="link" href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
       for Other compilers</a>
     </h6>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/bad_expression.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/bad_expression.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/bad_expression.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id751917"></a>
+<a name="id794679"></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"><</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">></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="id752278"></a>
+<a name="id795040"></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">&</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: trunk/libs/regex/doc/html/boost_regex/ref/basic_regex.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/basic_regex.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/basic_regex.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id668290"></a>
+<a name="id711064"></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"><</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">></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="id673834"></a>
+<a name="id716676"></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="id675198"></a><p class="title"><b>Table 1. basic_regex default construction postconditions</b></p>
+<a name="id718587"></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="id676043"></a><p class="title"><b>Table 2. Postconditions for basic_regex construction</b></p>
+<a name="id718884"></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="id676455"></a><p class="title"><b>Table 3. Postconditions for basic_regex construction</b></p>
+<a name="id719297"></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="id676860"></a><p class="title"><b>Table 4. Postconditions for basic_regex construction</b></p>
+<a name="id719702"></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="id677336"></a><p class="title"><b>Table 5. Postconditions for basic_regex construction</b></p>
+<a name="id720178"></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="id677695"></a><p class="title"><b>Table 6. Postconditions for basic_regex construction</b></p>
+<a name="id720537"></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="id680375"></a><p class="title"><b>Table 7. Postconditions for basic_regex::assign</b></p>
+<a name="id723217"></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: trunk/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/concepts/traits_concept.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -34,7 +34,7 @@
           Boost-specific enhanced interface.
         </p>
 <a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
-<a name="id779263"></a>
+<a name="id822003"></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="id779878"></a>
+<a name="id822619"></a>
           <a class="link" href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
           Optional Requirements</a>
         </h5>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id780400"></a>
+<a name="id823141"></a>
           <a class="link" href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
           regex_format</a>
         </h5>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/error_type.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/error_type.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/error_type.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id758596"></a>
+<a name="id801487"></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="id759011"></a>
+<a name="id801902"></a>
         <a class="link" href="error_type.html#boost_regex.ref.error_type.description">Description</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/match_flag_type.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/match_flag_type.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/match_flag_type.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id758045"></a>
+<a name="id800936"></a>
         <a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/match_results.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/match_results.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/match_results.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id684548"></a>
+<a name="id727322"></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"><</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">></span>
@@ -166,7 +166,7 @@
          <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
 </pre>
 <a name="boost_regex.ref.match_results.description"></a><h5>
-<a name="id689626"></a>
+<a name="id732468"></a>
         <a class="link" href="match_results.html#boost_regex.ref.match_results.description">Description</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id761519"></a>
+<a name="id804264"></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="id762034"></a>
+<a name="id804779"></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="id762453"></a>
+<a name="id805198"></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: trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id762771"></a>
+<a name="id805516"></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="id764128"></a>
+<a name="id806951"></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: trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id769118"></a>
+<a name="id811794"></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="id769775"></a>
+<a name="id812452"></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="id770206"></a>
+<a name="id812882"></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="id770741"></a>
+<a name="id815432"></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="id772949"></a>
+<a name="id815723"></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: trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id773719"></a>
+<a name="id816493"></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="id774268"></a>
+<a name="id817041"></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: trunk/libs/regex/doc/html/boost_regex/ref/posix.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/posix.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/posix.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -165,7 +165,7 @@
 <a name="regcomp"></a><p>
       </p>
 <a name="boost_regex.ref.posix.regcomp"></a><h5>
-<a name="id776953"></a>
+<a name="id819726"></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="id777458"></a>
+<a name="id820232"></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="id777586"></a>
+<a name="id821458"></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="id778830"></a>
+<a name="id821570"></a>
         <a class="link" href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/regex_iterator.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/regex_iterator.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/regex_iterator.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id735434"></a>
+<a name="id778196"></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="id738951"></a>
+<a name="id781714"></a>
         <a class="link" href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/regex_match.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/regex_match.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/regex_match.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id719031"></a>
+<a name="id761793"></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"><</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">></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="id722494"></a>
+<a name="id765256"></a>
         <a class="link" href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/regex_replace.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/regex_replace.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/regex_replace.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id730052"></a>
+<a name="id771722"></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"><</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">></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="id732259"></a>
+<a name="id775022"></a>
         <a class="link" href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/regex_search.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/regex_search.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/regex_search.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id724118"></a>
+<a name="id766880"></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"><</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">></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="id728735"></a>
+<a name="id770405"></a>
         <a class="link" href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/regex_token_iterator.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id745138"></a>
+<a name="id787900"></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="id749909"></a>
+<a name="id792671"></a>
         <a class="link" href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/regex_traits.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/regex_traits.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/regex_traits.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id759551"></a>
+<a name="id802442"></a>
         <a class="link" href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
       </h5>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/ref/sub_match.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/ref/sub_match.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/ref/sub_match.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id703980"></a>
+<a name="id746742"></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="id703993"></a>
+<a name="id746755"></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="id705093"></a>
+<a name="id747855"></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="id717087"></a>
+<a name="id759849"></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: trunk/libs/regex/doc/html/boost_regex/syntax/basic_extended.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/syntax/basic_extended.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/syntax/basic_extended.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -28,7 +28,7 @@
       Expression Syntax</a>
 </h3></div></div></div>
 <a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
-<a name="id656257"></a>
+<a name="id699030"></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="id656436"></a>
+<a name="id699209"></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="id656457"></a>
+<a name="id699231"></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="id656502"></a>
+<a name="id699275"></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="id656524"></a>
+<a name="id699298"></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="id656558"></a>
+<a name="id699332"></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="id656864"></a>
+<a name="id699638"></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="id656928"></a>
+<a name="id699701"></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="id656995"></a>
+<a name="id699768"></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="id657015"></a>
+<a name="id699789"></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="id657046"></a>
+<a name="id699820"></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="id657108"></a>
+<a name="id699881"></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="id657162"></a>
+<a name="id699935"></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="id657213"></a>
+<a name="id699987"></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="id657315"></a>
+<a name="id700089"></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="id657373"></a>
+<a name="id700146"></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="id657426"></a>
+<a name="id700199"></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="id657469"></a>
+<a name="id700242"></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="id657759"></a>
+<a name="id700533"></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="id658328"></a>
+<a name="id701102"></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="id658635"></a>
+<a name="id701409"></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="id658791"></a>
+<a name="id701565"></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="id658976"></a>
+<a name="id701750"></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="id659004"></a>
+<a name="id701777"></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="id659084"></a>
+<a name="id701858"></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="id659186"></a>
+<a name="id701960"></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="id659203"></a>
+<a name="id701976"></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="id659336"></a>
+<a name="id702110"></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="id659358"></a>
+<a name="id702131"></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="id659371"></a>
+<a name="id702144"></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="id659473"></a>
+<a name="id702246"></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="id659498"></a>
+<a name="id702272"></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="id659576"></a>
+<a name="id702350"></a>
         <a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
       </h4>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -28,7 +28,7 @@
       Expression Syntax</a>
 </h3></div></div></div>
 <a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
-<a name="id659625"></a>
+<a name="id702399"></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="id659821"></a>
+<a name="id702594"></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="id659842"></a>
+<a name="id702616"></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="id659887"></a>
+<a name="id702660"></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="id659907"></a>
+<a name="id702681"></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="id659938"></a>
+<a name="id702712"></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="id660103"></a>
+<a name="id702876"></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="id660152"></a>
+<a name="id702926"></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="id660172"></a>
+<a name="id702946"></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="id660204"></a>
+<a name="id702977"></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="id660260"></a>
+<a name="id703034"></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="id660298"></a>
+<a name="id703072"></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="id660350"></a>
+<a name="id704984"></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="id660441"></a>
+<a name="id705076"></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="id660499"></a>
+<a name="id705133"></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="id662424"></a>
+<a name="id705186"></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="id662458"></a>
+<a name="id705220"></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="id662479"></a>
+<a name="id705241"></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="id662500"></a>
+<a name="id705262"></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="id662594"></a>
+<a name="id705356"></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="id663012"></a>
+<a name="id705774"></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="id663119"></a>
+<a name="id705881"></a>
         <a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
       </h4>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -28,7 +28,7 @@
       Syntax</a>
 </h3></div></div></div>
 <a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4>
-<a name="id650518"></a>
+<a name="id693116"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
       </h4>
 <p>
@@ -43,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="id650665"></a>
+<a name="id693264"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
         Regular Expression Syntax</a>
       </h4>
@@ -53,7 +53,7 @@
       </p>
 <pre class="programlisting">.[{()\*+?|^$</pre>
 <a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5>
-<a name="id650689"></a>
+<a name="id693288"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
       </h5>
 <p>
@@ -73,7 +73,7 @@
         </li>
 </ul></div>
 <a name="boost_regex.syntax.perl_syntax.anchors"></a><h5>
-<a name="id650736"></a>
+<a name="id693334"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
       </h5>
 <p>
@@ -83,7 +83,7 @@
         A '$' character shall match the end of a line.
       </p>
 <a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5>
-<a name="id650758"></a>
+<a name="id693356"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
         sub-expressions</a>
       </h5>
@@ -94,7 +94,7 @@
         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="id650784"></a>
+<a name="id693382"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
         grouping</a>
       </h5>
@@ -107,7 +107,7 @@
         without splitting out any separate sub-expressions.
       </p>
 <a name="boost_regex.syntax.perl_syntax.repeats"></a><h5>
-<a name="id650820"></a>
+<a name="id693418"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
       </h5>
 <p>
@@ -188,7 +188,7 @@
         to be applied to.
       </p>
 <a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5>
-<a name="id651056"></a>
+<a name="id693655"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
         repeats</a>
       </h5>
@@ -218,7 +218,7 @@
         while consuming as little input as possible.
       </p>
 <a name="boost_regex.syntax.perl_syntax.pocessive_repeats"></a><h5>
-<a name="id651115"></a>
+<a name="id693714"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pocessive_repeats">Pocessive
         repeats</a>
       </h5>
@@ -250,7 +250,7 @@
         while giving nothing back.
       </p>
 <a name="boost_regex.syntax.perl_syntax.back_references"></a><h5>
-<a name="id651174"></a>
+<a name="id693772"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
       </h5>
 <p>
@@ -360,7 +360,7 @@
         named "two".
       </p>
 <a name="boost_regex.syntax.perl_syntax.alternation"></a><h5>
-<a name="id651394"></a>
+<a name="id693992"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
       </h5>
 <p>
@@ -387,7 +387,7 @@
         <code class="literal">(?:abc)??</code> has exactly the same effect.
       </p>
 <a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5>
-<a name="id651462"></a>
+<a name="id694060"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
       </h5>
 <p>
@@ -399,7 +399,7 @@
         A bracket expression may contain any combination of the following:
       </p>
 <a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6>
-<a name="id651493"></a>
+<a name="id694092"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
       </h6>
 <p>
@@ -407,7 +407,7 @@
         'b', or 'c'.
       </p>
 <a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6>
-<a name="id651515"></a>
+<a name="id694113"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
         ranges</a>
       </h6>
@@ -421,7 +421,7 @@
         sensitive.
       </p>
 <a name="boost_regex.syntax.perl_syntax.negation"></a><h6>
-<a name="id651547"></a>
+<a name="id694146"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
       </h6>
 <p>
@@ -430,7 +430,7 @@
         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="id651575"></a>
+<a name="id694173"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
         classes</a>
       </h6>
@@ -441,7 +441,7 @@
         class names</a>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6>
-<a name="id651607"></a>
+<a name="id694206"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
         Elements</a>
       </h6>
@@ -463,7 +463,7 @@
         matches a <code class="literal">\0</code> character.
       </p>
 <a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6>
-<a name="id651670"></a>
+<a name="id694268"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
         classes</a>
       </h6>
@@ -480,7 +480,7 @@
         or even all locales on one platform.
       </p>
 <a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6>
-<a name="id651718"></a>
+<a name="id694316"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
         Characters</a>
       </h6>
@@ -492,7 +492,7 @@
         is <span class="emphasis"><em>not</em></span> a "word" character.
       </p>
 <a name="boost_regex.syntax.perl_syntax.combinations"></a><h6>
-<a name="id651786"></a>
+<a name="id694384"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
       </h6>
 <p>
@@ -500,7 +500,7 @@
         <code class="literal">[[:digit:]a-c[.NUL.]]</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.escapes"></a><h5>
-<a name="id651808"></a>
+<a name="id694406"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
       </h5>
 <p>
@@ -692,7 +692,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6>
-<a name="id653698"></a>
+<a name="id696296"></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>
@@ -894,7 +894,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6>
-<a name="id654298"></a>
+<a name="id696896"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
         Properties</a>
       </h6>
@@ -1002,7 +1002,7 @@
         as does <code class="literal">\p{digit}</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6>
-<a name="id654587"></a>
+<a name="id697185"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
       </h6>
 <p>
@@ -1021,7 +1021,7 @@
         <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="id654638"></a>
+<a name="id697237"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
       </h6>
 <p>
@@ -1046,7 +1046,7 @@
         to the regular expression <code class="literal">\n*\z</code>
       </p>
 <a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6>
-<a name="id654679"></a>
+<a name="id697278"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
         Escape</a>
       </h6>
@@ -1058,7 +1058,7 @@
         one ended.
       </p>
 <a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6>
-<a name="id654701"></a>
+<a name="id697299"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
       </h6>
 <p>
@@ -1071,7 +1071,7 @@
 <span class="special">\*+</span><span class="identifier">aaa</span>
 </pre>
 <a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6>
-<a name="id654748"></a>
+<a name="id697346"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
       </h6>
 <p>
@@ -1081,7 +1081,7 @@
         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="id654774"></a>
+<a name="id697372"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.matching_line_endings">Matching
         Line Endings</a>
       </h6>
@@ -1090,7 +1090,7 @@
         sequence, specifically it is identical to the expression <code class="literal">(?>\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="id654800"></a>
+<a name="id697399"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.keeping_back_some_text">Keeping
         back some text</a>
       </h6>
@@ -1105,7 +1105,7 @@
         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="id654830"></a>
+<a name="id697429"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
         escape</a>
       </h6>
@@ -1114,7 +1114,7 @@
         \@ matches a literal '@'.
       </p>
 <a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5>
-<a name="id654847"></a>
+<a name="id697446"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
         Extended Patterns</a>
       </h5>
@@ -1123,7 +1123,7 @@
         <code class="literal">(?</code>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.named_subexpressions"></a><h6>
-<a name="id654869"></a>
+<a name="id697467"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions">Named
         Subexpressions</a>
       </h6>
@@ -1145,14 +1145,14 @@
         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="id654964"></a>
+<a name="id697562"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
       </h6>
 <p>
         <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="id654986"></a>
+<a name="id697585"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
       </h6>
 <p>
@@ -1166,7 +1166,7 @@
         pattern only.
       </p>
 <a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6>
-<a name="id655021"></a>
+<a name="id697620"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
         groups</a>
       </h6>
@@ -1175,7 +1175,7 @@
         an additional sub-expression.
       </p>
 <a name="boost_regex.syntax.perl_syntax.branch_reset"></a><h6>
-<a name="id655043"></a>
+<a name="id697641"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.branch_reset">Branch reset</a>
       </h6>
 <p>
@@ -1197,7 +1197,7 @@
 # 1            2         2  3        2     3     4
 </pre>
 <a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6>
-<a name="id655080"></a>
+<a name="id697678"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
       </h6>
 <p>
@@ -1220,7 +1220,7 @@
         could be used to validate the password.
       </p>
 <a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6>
-<a name="id655154"></a>
+<a name="id697753"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
       </h6>
 <p>
@@ -1234,7 +1234,7 @@
         (pattern must be of fixed length).
       </p>
 <a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6>
-<a name="id655187"></a>
+<a name="id697785"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
         sub-expressions</a>
       </h6>
@@ -1246,8 +1246,32 @@
         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="id697816"></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="id655218"></a>
+<a name="id697914"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
         Expressions</a>
       </h6>
@@ -1261,12 +1285,35 @@
         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>
+</ul></div>
 <a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5>
-<a name="id655273"></a>
+<a name="id698047"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
         precedence</a>
       </h5>
@@ -1301,7 +1348,7 @@
         </li>
 </ol></div>
 <a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4>
-<a name="id655363"></a>
+<a name="id698137"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
         matched</a>
       </h4>
@@ -1476,7 +1523,7 @@
 </tbody>
 </table></div>
 <a name="boost_regex.syntax.perl_syntax.variations"></a><h4>
-<a name="id656077"></a>
+<a name="id698850"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
       </h4>
 <p>
@@ -1485,7 +1532,7 @@
         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="id656124"></a>
+<a name="id698897"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
       </h4>
 <p>
@@ -1497,7 +1544,7 @@
         are to be applied.
       </p>
 <a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4>
-<a name="id656172"></a>
+<a name="id698945"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
         Modifiers</a>
       </h4>
@@ -1509,7 +1556,7 @@
         and <code class="literal">no_mod_s</code></a>.
       </p>
 <a name="boost_regex.syntax.perl_syntax.references"></a><h4>
-<a name="id656224"></a>
+<a name="id698998"></a>
         <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
       </h4>
 <p>
Modified: trunk/libs/regex/doc/html/boost_regex/unicode.html
==============================================================================
--- trunk/libs/regex/doc/html/boost_regex/unicode.html	(original)
+++ trunk/libs/regex/doc/html/boost_regex/unicode.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id646668"></a>
+<a name="id689266"></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="id646785"></a>
+<a name="id689384"></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: trunk/libs/regex/doc/html/index.html
==============================================================================
--- trunk/libs/regex/doc/html/index.html	(original)
+++ trunk/libs/regex/doc/html/index.html	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -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="id637415"></a><p>
+<a name="id680013"></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: May 13, 2009 at 09:14:16 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 16, 2009 at 15:54:11 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>
Modified: trunk/libs/regex/doc/syntax_perl.qbk
==============================================================================
--- trunk/libs/regex/doc/syntax_perl.qbk	(original)
+++ trunk/libs/regex/doc/syntax_perl.qbk	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -511,6 +511,17 @@
 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 
@@ -519,9 +530,21 @@
 =(?(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/.
 
 [h4 Operator precedence]
 
Modified: trunk/libs/regex/test/regress/main.cpp
==============================================================================
--- trunk/libs/regex/test/regress/main.cpp	(original)
+++ trunk/libs/regex/test/regress/main.cpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -72,6 +72,7 @@
    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: trunk/libs/regex/test/regress/test.hpp
==============================================================================
--- trunk/libs/regex/test/regress/test.hpp	(original)
+++ trunk/libs/regex/test/regress/test.hpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -260,5 +260,6 @@
 void test_unicode();
 void test_pocessive_repeats();
 void test_mark_resets();
+void test_recursion();
 
 #endif
Modified: trunk/libs/regex/test/regress/test_non_greedy_repeats.cpp
==============================================================================
--- trunk/libs/regex/test/regress/test_non_greedy_repeats.cpp	(original)
+++ trunk/libs/regex/test/regress/test_non_greedy_repeats.cpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 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: trunk/libs/regex/test/regress/test_perl_ex.cpp
==============================================================================
--- trunk/libs/regex/test/regress/test_perl_ex.cpp	(original)
+++ trunk/libs/regex/test/regress/test_perl_ex.cpp	2009-07-17 06:23:50 EDT (Fri, 17 Jul 2009)
@@ -665,14 +665,173 @@
    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("(?|(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, 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, 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, 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));
 }