From 7b10b5dac5265e26a9ed126101ebf0c455104796 Mon Sep 17 00:00:00 2001
From: John Maddock
Date: Thu, 23 Apr 2009 09:51:31 +0000
Subject: [PATCH] Added possessive modifiers ++ *+ ?+ {}+. Added support for \v
and \h as character classes as per Perl-5.10.
[SVN r52558]
---
.../boost_regex/background_information.html | 2 +-
.../acknowledgements.html | 2 +-
.../background_information/examples.html | 8 +-
.../background_information/faq.html | 2 +-
.../background_information/futher.html | 2 +-
.../background_information/headers.html | 2 +-
.../background_information/history.html | 16 +-
.../background_information/locale.html | 10 +-
.../background_information/performance.html | 2 +-
.../background_information/redist.html | 2 +-
.../background_information/standards.html | 12 +-
.../background_information/thread_safety.html | 2 +-
doc/html/boost_regex/captures.html | 8 +-
doc/html/boost_regex/configuration.html | 2 +-
.../boost_regex/configuration/algorithm.html | 2 +-
.../boost_regex/configuration/compiler.html | 2 +-
.../boost_regex/configuration/linkage.html | 2 +-
.../boost_regex/configuration/locale.html | 2 +-
.../boost_regex/configuration/tuning.html | 2 +-
doc/html/boost_regex/format.html | 2 +-
.../format/boost_format_syntax.html | 10 +-
doc/html/boost_regex/format/perl_format.html | 2 +-
doc/html/boost_regex/format/sed_format.html | 2 +-
doc/html/boost_regex/install.html | 18 +-
.../introduction_and_overview.html | 2 +-
doc/html/boost_regex/partial_matches.html | 2 +-
doc/html/boost_regex/ref.html | 2 +-
doc/html/boost_regex/ref/bad_expression.html | 6 +-
doc/html/boost_regex/ref/basic_regex.html | 20 +--
doc/html/boost_regex/ref/concepts.html | 2 +-
.../ref/concepts/charT_concept.html | 2 +-
.../ref/concepts/iterator_concepts.html | 2 +-
.../ref/concepts/traits_concept.html | 6 +-
.../ref/deprecated_interfaces.html | 2 +-
.../ref/deprecated_interfaces/old_regex.html | 2 +-
.../deprecated_interfaces/regex_format.html | 4 +-
.../ref/deprecated_interfaces/regex_grep.html | 2 +-
.../deprecated_interfaces/regex_split.html | 2 +-
doc/html/boost_regex/ref/error_type.html | 6 +-
doc/html/boost_regex/ref/match_flag_type.html | 4 +-
doc/html/boost_regex/ref/match_results.html | 6 +-
doc/html/boost_regex/ref/non_std_strings.html | 2 +-
.../boost_regex/ref/non_std_strings/icu.html | 2 +-
.../ref/non_std_strings/icu/intro.html | 2 +-
.../ref/non_std_strings/icu/unicode_algo.html | 8 +-
.../ref/non_std_strings/icu/unicode_iter.html | 6 +-
.../non_std_strings/icu/unicode_types.html | 2 +-
.../ref/non_std_strings/mfc_strings.html | 2 +-
.../non_std_strings/mfc_strings/mfc_algo.html | 12 +-
.../mfc_strings/mfc_intro.html | 2 +-
.../non_std_strings/mfc_strings/mfc_iter.html | 6 +-
.../mfc_strings/mfc_regex_create.html | 2 +-
.../mfc_strings/mfc_regex_types.html | 2 +-
doc/html/boost_regex/ref/posix.html | 10 +-
doc/html/boost_regex/ref/regex_iterator.html | 6 +-
doc/html/boost_regex/ref/regex_match.html | 6 +-
doc/html/boost_regex/ref/regex_replace.html | 6 +-
doc/html/boost_regex/ref/regex_search.html | 6 +-
.../boost_regex/ref/regex_token_iterator.html | 6 +-
doc/html/boost_regex/ref/regex_traits.html | 4 +-
doc/html/boost_regex/ref/sub_match.html | 10 +-
.../boost_regex/ref/syntax_option_type.html | 2 +-
.../syntax_option_type_basic.html | 2 +-
.../syntax_option_type_extended.html | 2 +-
.../syntax_option_type_literal.html | 2 +-
.../syntax_option_type_overview.html | 2 +-
.../syntax_option_type_perl.html | 2 +-
.../syntax_option_type_synopsis.html | 2 +-
doc/html/boost_regex/syntax.html | 2 +-
.../boost_regex/syntax/basic_extended.html | 68 +++----
doc/html/boost_regex/syntax/basic_syntax.html | 46 ++---
.../boost_regex/syntax/character_classes.html | 2 +-
.../optional_char_class_names.html | 2 +-
.../character_classes/std_char_clases.html | 2 +-
.../boost_regex/syntax/collating_names.html | 2 +-
.../syntax/collating_names/digraphs.html | 2 +-
.../syntax/collating_names/named_unicode.html | 2 +-
.../collating_names/posix_symbolic_names.html | 2 +-
.../syntax/leftmost_longest_rule.html | 2 +-
doc/html/boost_regex/syntax/perl_syntax.html | 166 +++++++++++++-----
doc/html/boost_regex/unicode.html | 6 +-
doc/html/index.html | 6 +-
doc/syntax_perl.qbk | 21 +++
include/boost/regex/icu.hpp | 6 +-
include/boost/regex/v4/basic_regex_parser.hpp | 29 ++-
include/boost/regex/v4/cpp_regex_traits.hpp | 34 +++-
.../boost/regex/v4/regex_traits_defaults.hpp | 13 +-
include/boost/regex/v4/w32_regex_traits.hpp | 12 +-
src/c_regex_traits.cpp | 10 +-
src/icu.cpp | 8 +
src/wc_regex_traits.cpp | 10 +-
test/regress/main.cpp | 1 +
test/regress/test.hpp | 2 +-
test/regress/test_non_greedy_repeats.cpp | 2 +-
test/regress/test_sets.cpp | 4 +
test/regress/test_simple_repeats.cpp | 41 +++++
96 files changed, 521 insertions(+), 286 deletions(-)
diff --git a/doc/html/boost_regex/background_information.html b/doc/html/boost_regex/background_information.html
index db5c0165..76048eed 100644
--- a/doc/html/boost_regex/background_information.html
+++ b/doc/html/boost_regex/background_information.html
@@ -3,7 +3,7 @@
Background Information
-
+
diff --git a/doc/html/boost_regex/background_information/acknowledgements.html b/doc/html/boost_regex/background_information/acknowledgements.html
index 71f5252f..68565667 100644
--- a/doc/html/boost_regex/background_information/acknowledgements.html
+++ b/doc/html/boost_regex/background_information/acknowledgements.html
@@ -3,7 +3,7 @@
Acknowledgements
-
+
diff --git a/doc/html/boost_regex/background_information/examples.html b/doc/html/boost_regex/background_information/examples.html
index 9f9dcc6c..99b7fbc6 100644
--- a/doc/html/boost_regex/background_information/examples.html
+++ b/doc/html/boost_regex/background_information/examples.html
@@ -3,7 +3,7 @@
Test and Example Programs
-
+
@@ -28,7 +28,7 @@
Example Programs
@@ -107,7 +107,7 @@
Files: captures_test.cpp .
@@ -133,7 +133,7 @@
Files: regex_timer.cpp .
diff --git a/doc/html/boost_regex/background_information/faq.html b/doc/html/boost_regex/background_information/faq.html
index 950b9eac..aded683f 100644
--- a/doc/html/boost_regex/background_information/faq.html
+++ b/doc/html/boost_regex/background_information/faq.html
@@ -3,7 +3,7 @@
FAQ
-
+
diff --git a/doc/html/boost_regex/background_information/futher.html b/doc/html/boost_regex/background_information/futher.html
index d058b19f..6ff56c4c 100644
--- a/doc/html/boost_regex/background_information/futher.html
+++ b/doc/html/boost_regex/background_information/futher.html
@@ -3,7 +3,7 @@
References and Further Information
-
+
diff --git a/doc/html/boost_regex/background_information/headers.html b/doc/html/boost_regex/background_information/headers.html
index e5a9a7c4..da1abfcc 100644
--- a/doc/html/boost_regex/background_information/headers.html
+++ b/doc/html/boost_regex/background_information/headers.html
@@ -3,7 +3,7 @@
Headers
-
+
diff --git a/doc/html/boost_regex/background_information/history.html b/doc/html/boost_regex/background_information/history.html
index b2069ec7..601b75e1 100644
--- a/doc/html/boost_regex/background_information/history.html
+++ b/doc/html/boost_regex/background_information/history.html
@@ -3,7 +3,7 @@
History
-
+
@@ -26,7 +26,7 @@
History
@@ -36,7 +36,7 @@
empty alternatives are now allowed when using the Perl regular expression
syntax. This change has been added for Perl compatibility, when the new
syntax_option_type
no_empty_expressions is set then the old behaviour
- is preserved and empty expressions are prohibited.
+ is preserved and empty expressions are prohibited. This is issue #1081 .
Added support for Perl style ${n} expressions in format strings (issue
@@ -53,7 +53,7 @@
@@ -76,7 +76,7 @@
@@ -146,7 +146,7 @@
@@ -201,7 +201,7 @@
@@ -209,7 +209,7 @@
Fixed bug in partial matches of bounded repeats of '.'.
diff --git a/doc/html/boost_regex/background_information/locale.html b/doc/html/boost_regex/background_information/locale.html
index 0e8b0694..79434fe7 100644
--- a/doc/html/boost_regex/background_information/locale.html
+++ b/doc/html/boost_regex/background_information/locale.html
@@ -3,7 +3,7 @@
Localization
-
+
@@ -58,7 +58,7 @@
There are three separate localization mechanisms supported by Boost.Regex:
@@ -90,7 +90,7 @@
are treated as "unknown" graphic characters.
@@ -114,7 +114,7 @@
libraries including version 1 of this library.
@@ -151,7 +151,7 @@
in your code. The best way to ensure this is to add the #define to < boost / regex / user . hpp >
.
diff --git a/doc/html/boost_regex/background_information/performance.html b/doc/html/boost_regex/background_information/performance.html
index f25106fc..c3ab2735 100644
--- a/doc/html/boost_regex/background_information/performance.html
+++ b/doc/html/boost_regex/background_information/performance.html
@@ -3,7 +3,7 @@
Performance
-
+
diff --git a/doc/html/boost_regex/background_information/redist.html b/doc/html/boost_regex/background_information/redist.html
index 73c05a0a..6901b931 100644
--- a/doc/html/boost_regex/background_information/redist.html
+++ b/doc/html/boost_regex/background_information/redist.html
@@ -3,7 +3,7 @@
Redistributables
-
+
diff --git a/doc/html/boost_regex/background_information/standards.html b/doc/html/boost_regex/background_information/standards.html
index d2732b2f..b27a8940 100644
--- a/doc/html/boost_regex/background_information/standards.html
+++ b/doc/html/boost_regex/background_information/standards.html
@@ -3,7 +3,7 @@
Standards Conformance
-
+
@@ -28,7 +28,7 @@
Conformance
@@ -36,7 +36,7 @@
Report on C++ Library Extensions.
@@ -49,7 +49,7 @@
rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
@@ -62,7 +62,7 @@
(??{code}) Not implementable in a compiled strongly typed language.
@@ -82,7 +82,7 @@
a custom traits class.
diff --git a/doc/html/boost_regex/background_information/thread_safety.html b/doc/html/boost_regex/background_information/thread_safety.html
index eac436ac..c67aa107 100644
--- a/doc/html/boost_regex/background_information/thread_safety.html
+++ b/doc/html/boost_regex/background_information/thread_safety.html
@@ -3,7 +3,7 @@
Thread Safety
-
+
diff --git a/doc/html/boost_regex/captures.html b/doc/html/boost_regex/captures.html
index 7497c1c6..7ebc73c3 100644
--- a/doc/html/boost_regex/captures.html
+++ b/doc/html/boost_regex/captures.html
@@ -3,7 +3,7 @@
Understanding Marked Sub-Expressions and Captures
-
+
@@ -35,7 +35,7 @@
accessed.
@@ -218,7 +218,7 @@
output stream.
@@ -231,7 +231,7 @@
you can determine which sub-expressions matched by accessing the sub_match :: matched
data member.
diff --git a/doc/html/boost_regex/configuration.html b/doc/html/boost_regex/configuration.html
index 4489bc41..7b656e1a 100644
--- a/doc/html/boost_regex/configuration.html
+++ b/doc/html/boost_regex/configuration.html
@@ -3,7 +3,7 @@
Configuration
-
+
diff --git a/doc/html/boost_regex/configuration/algorithm.html b/doc/html/boost_regex/configuration/algorithm.html
index e68aee41..ea8e4d80 100644
--- a/doc/html/boost_regex/configuration/algorithm.html
+++ b/doc/html/boost_regex/configuration/algorithm.html
@@ -3,7 +3,7 @@
Algorithm Selection
-
+
diff --git a/doc/html/boost_regex/configuration/compiler.html b/doc/html/boost_regex/configuration/compiler.html
index 752d0c27..62931099 100644
--- a/doc/html/boost_regex/configuration/compiler.html
+++ b/doc/html/boost_regex/configuration/compiler.html
@@ -3,7 +3,7 @@
Compiler Setup
-
+
diff --git a/doc/html/boost_regex/configuration/linkage.html b/doc/html/boost_regex/configuration/linkage.html
index a7fa14b8..a6a5084d 100644
--- a/doc/html/boost_regex/configuration/linkage.html
+++ b/doc/html/boost_regex/configuration/linkage.html
@@ -3,7 +3,7 @@
Linkage Options
-
+
diff --git a/doc/html/boost_regex/configuration/locale.html b/doc/html/boost_regex/configuration/locale.html
index dc93af47..bfcbe924 100644
--- a/doc/html/boost_regex/configuration/locale.html
+++ b/doc/html/boost_regex/configuration/locale.html
@@ -3,7 +3,7 @@
Locale and traits class selection
-
+
diff --git a/doc/html/boost_regex/configuration/tuning.html b/doc/html/boost_regex/configuration/tuning.html
index 5884cca5..400afa6d 100644
--- a/doc/html/boost_regex/configuration/tuning.html
+++ b/doc/html/boost_regex/configuration/tuning.html
@@ -3,7 +3,7 @@
Algorithm Tuning
-
+
diff --git a/doc/html/boost_regex/format.html b/doc/html/boost_regex/format.html
index bbd5faae..f046222f 100644
--- a/doc/html/boost_regex/format.html
+++ b/doc/html/boost_regex/format.html
@@ -3,7 +3,7 @@
Search and Replace Format String Syntax
-
+
diff --git a/doc/html/boost_regex/format/boost_format_syntax.html b/doc/html/boost_regex/format/boost_format_syntax.html
index 63159fc3..12dd9109 100644
--- a/doc/html/boost_regex/format/boost_format_syntax.html
+++ b/doc/html/boost_regex/format/boost_format_syntax.html
@@ -3,7 +3,7 @@
Boost-Extended Format String Syntax
-
+
@@ -32,7 +32,7 @@
'$', '\', '(', ')', '?', and ':'.
@@ -40,7 +40,7 @@
you want a to output literal parenthesis.
@@ -66,7 +66,7 @@
with "bar" otherwise.
@@ -161,7 +161,7 @@
as a literal.
diff --git a/doc/html/boost_regex/format/perl_format.html b/doc/html/boost_regex/format/perl_format.html
index 3764ed34..fde101e3 100644
--- a/doc/html/boost_regex/format/perl_format.html
+++ b/doc/html/boost_regex/format/perl_format.html
@@ -3,7 +3,7 @@
Perl Format String Syntax
-
+
diff --git a/doc/html/boost_regex/format/sed_format.html b/doc/html/boost_regex/format/sed_format.html
index cb806f6b..c2f310d7 100644
--- a/doc/html/boost_regex/format/sed_format.html
+++ b/doc/html/boost_regex/format/sed_format.html
@@ -3,7 +3,7 @@
Sed Format String Syntax
-
+
diff --git a/doc/html/boost_regex/install.html b/doc/html/boost_regex/install.html
index d325791c..99b298f5 100644
--- a/doc/html/boost_regex/install.html
+++ b/doc/html/boost_regex/install.html
@@ -3,7 +3,7 @@
Building and Installing the Library
-
+
@@ -49,7 +49,7 @@
file before you can use it, instructions for specific platforms are as follows:
@@ -58,7 +58,7 @@
started guide for more information.
@@ -96,11 +96,11 @@
ICU you are using is binary compatible with the toolset you use to build Boost.
@@ -166,7 +166,7 @@
a lot in compile times!
@@ -253,7 +253,7 @@
@@ -302,7 +302,7 @@
see the config library documentation .
@@ -347,7 +347,7 @@
will build v9 variants of the regex library named libboost_regex_v9.a etc.
diff --git a/doc/html/boost_regex/introduction_and_overview.html b/doc/html/boost_regex/introduction_and_overview.html
index 4ca4583c..2ca40f79 100644
--- a/doc/html/boost_regex/introduction_and_overview.html
+++ b/doc/html/boost_regex/introduction_and_overview.html
@@ -3,7 +3,7 @@
Introduction and Overview
-
+
diff --git a/doc/html/boost_regex/partial_matches.html b/doc/html/boost_regex/partial_matches.html
index d47cb538..a123ecb5 100644
--- a/doc/html/boost_regex/partial_matches.html
+++ b/doc/html/boost_regex/partial_matches.html
@@ -3,7 +3,7 @@
Partial Matches
-
+
diff --git a/doc/html/boost_regex/ref.html b/doc/html/boost_regex/ref.html
index 3d911322..52ee39a7 100644
--- a/doc/html/boost_regex/ref.html
+++ b/doc/html/boost_regex/ref.html
@@ -3,7 +3,7 @@
Reference
-
+
diff --git a/doc/html/boost_regex/ref/bad_expression.html b/doc/html/boost_regex/ref/bad_expression.html
index 1cbff685..f78ef075 100644
--- a/doc/html/boost_regex/ref/bad_expression.html
+++ b/doc/html/boost_regex/ref/bad_expression.html
@@ -3,7 +3,7 @@
bad_expression
-
+
@@ -27,7 +27,7 @@
bad_expression
#include < boost / pattern_except . hpp >
@@ -54,7 +54,7 @@
}
regex_error ( const std :: string & s , regex_constants :: error_type err , std :: ptrdiff_t pos );
diff --git a/doc/html/boost_regex/ref/basic_regex.html b/doc/html/boost_regex/ref/basic_regex.html
index 264865a5..30cb5969 100644
--- a/doc/html/boost_regex/ref/basic_regex.html
+++ b/doc/html/boost_regex/ref/basic_regex.html
@@ -3,7 +3,7 @@
basic_regex
-
+
@@ -27,7 +27,7 @@
basic_regex
#include < boost / regex . hpp >
@@ -244,7 +244,7 @@
}
@@ -327,7 +327,7 @@
basic_regex
.
-
Table 1. basic_regex default construction postconditions
+
Table 1. basic_regex default construction postconditions
@@ -407,7 +407,7 @@
flags specified in f .
-
Table 2. Postconditions for basic_regex construction
+
Table 2. Postconditions for basic_regex construction
@@ -512,7 +512,7 @@
specified in f .
-
Table 3. Postconditions for basic_regex construction
+
Table 3. Postconditions for basic_regex construction
@@ -616,7 +616,7 @@
according the option flags specified in f .
-
Table 4. Postconditions for basic_regex construction
+
Table 4. Postconditions for basic_regex construction
@@ -727,7 +727,7 @@
flags specified in f .
-
Table 5. Postconditions for basic_regex construction
+
Table 5. Postconditions for basic_regex construction
@@ -829,7 +829,7 @@
flags specified in f .
-
Table 6. Postconditions for basic_regex construction
+
Table 6. Postconditions for basic_regex construction
@@ -1043,7 +1043,7 @@
in f .
-
Table 7. Postconditions for basic_regex::assign
+
Table 7. Postconditions for basic_regex::assign
diff --git a/doc/html/boost_regex/ref/concepts.html b/doc/html/boost_regex/ref/concepts.html
index b64d9225..1ba9307e 100644
--- a/doc/html/boost_regex/ref/concepts.html
+++ b/doc/html/boost_regex/ref/concepts.html
@@ -3,7 +3,7 @@
Concepts
-
+
diff --git a/doc/html/boost_regex/ref/concepts/charT_concept.html b/doc/html/boost_regex/ref/concepts/charT_concept.html
index ad3a48b6..8a8d6879 100644
--- a/doc/html/boost_regex/ref/concepts/charT_concept.html
+++ b/doc/html/boost_regex/ref/concepts/charT_concept.html
@@ -3,7 +3,7 @@
charT Requirements
-
+
diff --git a/doc/html/boost_regex/ref/concepts/iterator_concepts.html b/doc/html/boost_regex/ref/concepts/iterator_concepts.html
index ca98a141..421ea25a 100644
--- a/doc/html/boost_regex/ref/concepts/iterator_concepts.html
+++ b/doc/html/boost_regex/ref/concepts/iterator_concepts.html
@@ -3,7 +3,7 @@
Iterator Requirements
-
+
diff --git a/doc/html/boost_regex/ref/concepts/traits_concept.html b/doc/html/boost_regex/ref/concepts/traits_concept.html
index ef09ab1c..ad23e706 100644
--- a/doc/html/boost_regex/ref/concepts/traits_concept.html
+++ b/doc/html/boost_regex/ref/concepts/traits_concept.html
@@ -3,7 +3,7 @@
Traits Class Requirements
-
+
@@ -34,7 +34,7 @@
Boost-specific enhanced interface.
@@ -381,7 +381,7 @@
diff --git a/doc/html/boost_regex/ref/deprecated_interfaces.html b/doc/html/boost_regex/ref/deprecated_interfaces.html
index caa8cd1f..784d146a 100644
--- a/doc/html/boost_regex/ref/deprecated_interfaces.html
+++ b/doc/html/boost_regex/ref/deprecated_interfaces.html
@@ -3,7 +3,7 @@
Deprecated Interfaces
-
+
diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html b/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html
index a360c329..a79abdd6 100644
--- a/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html
+++ b/doc/html/boost_regex/ref/deprecated_interfaces/old_regex.html
@@ -3,7 +3,7 @@
High Level Class RegEx (Deprecated)
-
+
diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html
index 62293232..02829968 100644
--- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html
+++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_format.html
@@ -3,7 +3,7 @@
regex_format (Deprecated)
-
+
@@ -34,7 +34,7 @@
previous version of Boost.Regex and will not be further updated:
diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html
index 1bd7f867..ae24f41c 100644
--- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html
+++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_grep.html
@@ -3,7 +3,7 @@
regex_grep (Deprecated)
-
+
diff --git a/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html b/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html
index 1c34e94d..26643536 100644
--- a/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html
+++ b/doc/html/boost_regex/ref/deprecated_interfaces/regex_split.html
@@ -3,7 +3,7 @@
regex_split (deprecated)
-
+
diff --git a/doc/html/boost_regex/ref/error_type.html b/doc/html/boost_regex/ref/error_type.html
index d91f0e9e..baa2636a 100644
--- a/doc/html/boost_regex/ref/error_type.html
+++ b/doc/html/boost_regex/ref/error_type.html
@@ -3,7 +3,7 @@
error_type
-
+
@@ -27,7 +27,7 @@
error_type
@@ -57,7 +57,7 @@
}
diff --git a/doc/html/boost_regex/ref/match_flag_type.html b/doc/html/boost_regex/ref/match_flag_type.html
index 50784ec1..8ee8482a 100644
--- a/doc/html/boost_regex/ref/match_flag_type.html
+++ b/doc/html/boost_regex/ref/match_flag_type.html
@@ -3,7 +3,7 @@
match_flag_type
-
+
@@ -69,7 +69,7 @@
}
diff --git a/doc/html/boost_regex/ref/match_results.html b/doc/html/boost_regex/ref/match_results.html
index 20f0bd3d..94438118 100644
--- a/doc/html/boost_regex/ref/match_results.html
+++ b/doc/html/boost_regex/ref/match_results.html
@@ -3,7 +3,7 @@
match_results
-
+
@@ -27,7 +27,7 @@
match_results
#include < boost / regex . hpp >
@@ -142,7 +142,7 @@
match_results < BidirectionalIterator , Allocator >& m2 );
diff --git a/doc/html/boost_regex/ref/non_std_strings.html b/doc/html/boost_regex/ref/non_std_strings.html
index 5f38cc26..4681e22b 100644
--- a/doc/html/boost_regex/ref/non_std_strings.html
+++ b/doc/html/boost_regex/ref/non_std_strings.html
@@ -3,7 +3,7 @@
Interfacing With Non-Standard String Types
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/icu.html b/doc/html/boost_regex/ref/non_std_strings/icu.html
index 2e7fdaf3..c369d563 100644
--- a/doc/html/boost_regex/ref/non_std_strings/icu.html
+++ b/doc/html/boost_regex/ref/non_std_strings/icu.html
@@ -3,7 +3,7 @@
Working With Unicode and ICU String Types
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/intro.html b/doc/html/boost_regex/ref/non_std_strings/icu/intro.html
index 0f426829..69b659bf 100644
--- a/doc/html/boost_regex/ref/non_std_strings/icu/intro.html
+++ b/doc/html/boost_regex/ref/non_std_strings/icu/intro.html
@@ -3,7 +3,7 @@
Introduction to using Regex with ICU
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html
index e636e849..ca7dd081 100644
--- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html
+++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_algo.html
@@ -3,7 +3,7 @@
Unicode Regular Expression Algorithms
-
+
@@ -43,7 +43,7 @@
on to the "real" algorithm.
@@ -89,7 +89,7 @@
}
@@ -128,7 +128,7 @@
}
diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html
index 0fbd6483..be77c195 100644
--- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html
+++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_iter.html
@@ -3,7 +3,7 @@
Unicode Aware Regex Iterators
-
+
@@ -28,7 +28,7 @@
Unicode Aware Regex Iterators
@@ -126,7 +126,7 @@
Provided of course that the input is encoded as UTF-8.
diff --git a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html
index cefbc15f..6c64febb 100644
--- a/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html
+++ b/doc/html/boost_regex/ref/non_std_strings/icu/unicode_types.html
@@ -3,7 +3,7 @@
Unicode regular expression types
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html
index 4592ae3d..e31a7b9c 100644
--- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html
+++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings.html
@@ -3,7 +3,7 @@
Using Boost Regex With MFC Strings
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html
index 1f73a084..7bb1c915 100644
--- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html
+++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_algo.html
@@ -3,7 +3,7 @@
Overloaded Algorithms For MFC String Types
-
+
@@ -34,7 +34,7 @@
here they are anyway:
@@ -82,7 +82,7 @@
}
@@ -110,7 +110,7 @@
}
@@ -149,7 +149,7 @@
}
@@ -164,7 +164,7 @@
+ s . GetLength (), e , f );
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html
index b9c60c1b..9ccedc23 100644
--- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html
+++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_intro.html
@@ -3,7 +3,7 @@
Introduction to Boost.Regex and MFC Strings
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html
index 1cae51e5..a6c18255 100644
--- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html
+++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_iter.html
@@ -3,7 +3,7 @@
Iterating Over the Matches Within An MFC String
-
+
@@ -32,7 +32,7 @@
an MFC/ATL string to a regex_iterator
or regex_token_iterator
:
@@ -68,7 +68,7 @@
}
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html
index 4279151e..487a6ed0 100644
--- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html
+++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_create.html
@@ -3,7 +3,7 @@
Regular Expression Creation From an MFC String
-
+
diff --git a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html
index fe00bb69..3cfa2cfc 100644
--- a/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html
+++ b/doc/html/boost_regex/ref/non_std_strings/mfc_strings/mfc_regex_types.html
@@ -3,7 +3,7 @@
Regex Types Used With MFC Strings
-
+
diff --git a/doc/html/boost_regex/ref/posix.html b/doc/html/boost_regex/ref/posix.html
index b60ac8c4..f9b28b98 100644
--- a/doc/html/boost_regex/ref/posix.html
+++ b/doc/html/boost_regex/ref/posix.html
@@ -3,7 +3,7 @@
POSIX Compatible C API's
-
+
@@ -165,7 +165,7 @@
@@ -379,7 +379,7 @@
@@ -467,7 +467,7 @@
@@ -537,7 +537,7 @@
diff --git a/doc/html/boost_regex/ref/regex_iterator.html b/doc/html/boost_regex/ref/regex_iterator.html
index 80561efa..a3c9d35c 100644
--- a/doc/html/boost_regex/ref/regex_iterator.html
+++ b/doc/html/boost_regex/ref/regex_iterator.html
@@ -3,7 +3,7 @@
regex_iterator
-
+
@@ -78,7 +78,7 @@
regex_constants :: match_flag_type m = regex_constants :: match_default );
@@ -436,7 +436,7 @@
m .
diff --git a/doc/html/boost_regex/ref/regex_match.html b/doc/html/boost_regex/ref/regex_match.html
index 7e8ea6b0..72e113b4 100644
--- a/doc/html/boost_regex/ref/regex_match.html
+++ b/doc/html/boost_regex/ref/regex_match.html
@@ -3,7 +3,7 @@
regex_match
-
+
@@ -80,7 +80,7 @@
match_flag_type flags = match_default );
template < class BidirectionalIterator , class Allocator , class charT , class traits >
@@ -360,7 +360,7 @@
Effects : Returns the result of regex_match ( s . begin (), s . end (), e , flags )
.
diff --git a/doc/html/boost_regex/ref/regex_replace.html b/doc/html/boost_regex/ref/regex_replace.html
index 1135203f..72e84c91 100644
--- a/doc/html/boost_regex/ref/regex_replace.html
+++ b/doc/html/boost_regex/ref/regex_replace.html
@@ -3,7 +3,7 @@
regex_replace
-
+
@@ -53,7 +53,7 @@
match_flag_type flags = match_default );
template < class OutputIterator , class BidirectionalIterator , class traits , class charT >
@@ -163,7 +163,7 @@
and then returns result
.
diff --git a/doc/html/boost_regex/ref/regex_search.html b/doc/html/boost_regex/ref/regex_search.html
index 35f3a630..8c10b0ec 100644
--- a/doc/html/boost_regex/ref/regex_search.html
+++ b/doc/html/boost_regex/ref/regex_search.html
@@ -3,7 +3,7 @@
regex_search
-
+
@@ -73,7 +73,7 @@
match_flag_type flags = match_default );
template < class BidirectionalIterator , class Allocator , class charT , class traits >
@@ -355,7 +355,7 @@
Effects : Returns the result of regex_search ( s . begin (), s . end (), e , flags )
.
diff --git a/doc/html/boost_regex/ref/regex_token_iterator.html b/doc/html/boost_regex/ref/regex_token_iterator.html
index 0df2dcd4..14dedba1 100644
--- a/doc/html/boost_regex/ref/regex_token_iterator.html
+++ b/doc/html/boost_regex/ref/regex_token_iterator.html
@@ -3,7 +3,7 @@
regex_token_iterator
-
+
@@ -136,7 +136,7 @@
regex_constants :: match_flag_type m = regex_constants :: match_default );
@@ -383,7 +383,7 @@
m .
diff --git a/doc/html/boost_regex/ref/regex_traits.html b/doc/html/boost_regex/ref/regex_traits.html
index 0d515761..04a84d31 100644
--- a/doc/html/boost_regex/ref/regex_traits.html
+++ b/doc/html/boost_regex/ref/regex_traits.html
@@ -3,7 +3,7 @@
regex_traits
-
+
@@ -46,7 +46,7 @@
}
diff --git a/doc/html/boost_regex/ref/sub_match.html b/doc/html/boost_regex/ref/sub_match.html
index bcc5eed7..98bd6f93 100644
--- a/doc/html/boost_regex/ref/sub_match.html
+++ b/doc/html/boost_regex/ref/sub_match.html
@@ -3,7 +3,7 @@
sub_match
-
+
@@ -329,11 +329,11 @@
}
@@ -473,7 +473,7 @@
@@ -1008,7 +1008,7 @@
+ m2 . str () .
diff --git a/doc/html/boost_regex/ref/syntax_option_type.html b/doc/html/boost_regex/ref/syntax_option_type.html
index 16e179c8..c5a27483 100644
--- a/doc/html/boost_regex/ref/syntax_option_type.html
+++ b/doc/html/boost_regex/ref/syntax_option_type.html
@@ -3,7 +3,7 @@
syntax_option_type
-
+
diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html
index df577ade..b7d7d225 100644
--- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html
+++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_basic.html
@@ -3,7 +3,7 @@
Options for POSIX Basic Regular Expressions
-
+
diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html
index 64163afc..f0895bc2 100644
--- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html
+++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_extended.html
@@ -3,7 +3,7 @@
Options for POSIX Extended Regular Expressions
-
+
diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html
index c948c3f6..ce3d6437 100644
--- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html
+++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_literal.html
@@ -3,7 +3,7 @@
Options for Literal Strings
-
+
diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html
index 1ece1a8b..0b3534fb 100644
--- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html
+++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_overview.html
@@ -3,7 +3,7 @@
Overview of syntax_option_type
-
+
diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
index 53eea33c..b7f8f77a 100644
--- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
+++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html
@@ -3,7 +3,7 @@
Options for Perl Regular Expressions
-
+
diff --git a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html
index 8ca8f042..9168914b 100644
--- a/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html
+++ b/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_synopsis.html
@@ -3,7 +3,7 @@
syntax_option_type Synopsis
-
+
diff --git a/doc/html/boost_regex/syntax.html b/doc/html/boost_regex/syntax.html
index ff46f19b..7cc7ca4c 100644
--- a/doc/html/boost_regex/syntax.html
+++ b/doc/html/boost_regex/syntax.html
@@ -3,7 +3,7 @@
Regular Expression Syntax
-
+
diff --git a/doc/html/boost_regex/syntax/basic_extended.html b/doc/html/boost_regex/syntax/basic_extended.html
index fe1d4cfa..d970baf0 100644
--- a/doc/html/boost_regex/syntax/basic_extended.html
+++ b/doc/html/boost_regex/syntax/basic_extended.html
@@ -3,7 +3,7 @@
POSIX Extended Regular Expression Syntax
-
+
@@ -28,7 +28,7 @@
Expression Syntax
@@ -46,7 +46,7 @@
@@ -56,7 +56,7 @@
.[{()\*+?|^$
@@ -74,7 +74,7 @@
@@ -86,7 +86,7 @@
of an expression, or the last character of a sub-expression.
@@ -98,7 +98,7 @@
to by a back-reference.
@@ -184,7 +184,7 @@ cab
operator to be applied to.
@@ -214,7 +214,7 @@ cab
@@ -227,7 +227,7 @@ cab
will match either of "abd" or "abef".
@@ -240,7 +240,7 @@ cab
A bracket expression may contain any combination of the following:
@@ -249,7 +249,7 @@ cab
or 'c'.
@@ -265,7 +265,7 @@ cab
the code points of the characters only.
@@ -274,7 +274,7 @@ cab
range a - c
.
@@ -284,7 +284,7 @@ cab
character class names .
@@ -312,7 +312,7 @@ cab
matches a NUL character.
@@ -329,7 +329,7 @@ cab
or even all locales on one platform.
@@ -337,7 +337,7 @@ cab
[[: digit :] a - c [. NUL .]]
.
@@ -363,7 +363,7 @@ cab
extensions are also supported by Boost.Regex:
@@ -552,7 +552,7 @@ cab
@@ -706,7 +706,7 @@ cab
@@ -813,7 +813,7 @@ cab
matches any "digit" character, as does
\ p { digit }
.
@@ -888,7 +888,7 @@ cab
@@ -979,7 +979,7 @@ cab
@@ -991,7 +991,7 @@ cab
match to start where the last one ended.
@@ -1005,7 +1005,7 @@ cab
\*+ aaa
@@ -1056,7 +1056,7 @@ cab
@@ -1065,7 +1065,7 @@ cab
\@ matches a literal '@'.
@@ -1101,7 +1101,7 @@ cab
@@ -1111,11 +1111,11 @@ cab
rule.
@@ -1136,7 +1136,7 @@ cab
used with the -E option.
@@ -1150,7 +1150,7 @@ cab
these by default anyway.
@@ -1163,7 +1163,7 @@ cab
modify how the case and locale sensitivity are to be applied.
diff --git a/doc/html/boost_regex/syntax/basic_syntax.html b/doc/html/boost_regex/syntax/basic_syntax.html
index 87d92ff1..72f216b8 100644
--- a/doc/html/boost_regex/syntax/basic_syntax.html
+++ b/doc/html/boost_regex/syntax/basic_syntax.html
@@ -3,7 +3,7 @@
POSIX Basic Regular Expression Syntax
-
+
@@ -28,7 +28,7 @@
Expression Syntax
@@ -45,7 +45,7 @@
@@ -55,7 +55,7 @@
.[\*^$
@@ -73,7 +73,7 @@
@@ -85,7 +85,7 @@
of an expression, or the last character of a sub-expression.
@@ -97,7 +97,7 @@
by a back-reference.
@@ -155,7 +155,7 @@ aaaa
to.
@@ -173,7 +173,7 @@ aaaa
aaabba
@@ -186,7 +186,7 @@ aaaa
A bracket expression may contain any combination of the following:
@@ -195,7 +195,7 @@ aaaa
or 'c'.
@@ -211,7 +211,7 @@ aaaa
of the characters only.
@@ -220,7 +220,7 @@ aaaa
range a-c.
@@ -230,7 +230,7 @@ aaaa
character class names .
@@ -259,7 +259,7 @@ aaaa
element names.
@@ -276,7 +276,7 @@ aaaa
or even all locales on one platform.
@@ -284,7 +284,7 @@ aaaa
[[: digit :] a - c [. NUL .]].
@@ -299,7 +299,7 @@ aaaa
will match either a literal '\' or a '^'.
@@ -309,13 +309,13 @@ aaaa
rule.
@@ -333,7 +333,7 @@ aaaa
As its name suggests, this behavior is consistent with the Unix utility grep.
@@ -613,7 +613,7 @@ aaaa
leftmost-longest rule.
@@ -627,7 +627,7 @@ aaaa
options modify how the case and locale sensitivity are to be applied.
diff --git a/doc/html/boost_regex/syntax/character_classes.html b/doc/html/boost_regex/syntax/character_classes.html
index 730370e1..8611af01 100644
--- a/doc/html/boost_regex/syntax/character_classes.html
+++ b/doc/html/boost_regex/syntax/character_classes.html
@@ -3,7 +3,7 @@
Character Class Names
-
+
diff --git a/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html b/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html
index 13e92c0d..0c689b93 100644
--- a/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html
+++ b/doc/html/boost_regex/syntax/character_classes/optional_char_class_names.html
@@ -3,7 +3,7 @@
Character classes that are supported by Unicode Regular Expressions
-
+
diff --git a/doc/html/boost_regex/syntax/character_classes/std_char_clases.html b/doc/html/boost_regex/syntax/character_classes/std_char_clases.html
index f662c10c..f8ddd4c3 100644
--- a/doc/html/boost_regex/syntax/character_classes/std_char_clases.html
+++ b/doc/html/boost_regex/syntax/character_classes/std_char_clases.html
@@ -3,7 +3,7 @@
Character Classes that are Always Supported
-
+
diff --git a/doc/html/boost_regex/syntax/collating_names.html b/doc/html/boost_regex/syntax/collating_names.html
index c2ff15a2..b3a8e1c2 100644
--- a/doc/html/boost_regex/syntax/collating_names.html
+++ b/doc/html/boost_regex/syntax/collating_names.html
@@ -3,7 +3,7 @@
Collating Names
-
+
diff --git a/doc/html/boost_regex/syntax/collating_names/digraphs.html b/doc/html/boost_regex/syntax/collating_names/digraphs.html
index 661301ad..7affbae9 100644
--- a/doc/html/boost_regex/syntax/collating_names/digraphs.html
+++ b/doc/html/boost_regex/syntax/collating_names/digraphs.html
@@ -3,7 +3,7 @@
Digraphs
-
+
diff --git a/doc/html/boost_regex/syntax/collating_names/named_unicode.html b/doc/html/boost_regex/syntax/collating_names/named_unicode.html
index fdadc6e9..acb51cb1 100644
--- a/doc/html/boost_regex/syntax/collating_names/named_unicode.html
+++ b/doc/html/boost_regex/syntax/collating_names/named_unicode.html
@@ -3,7 +3,7 @@
Named Unicode Characters
-
+
diff --git a/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html b/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html
index 99d05b20..12bdded3 100644
--- a/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html
+++ b/doc/html/boost_regex/syntax/collating_names/posix_symbolic_names.html
@@ -3,7 +3,7 @@
POSIX Symbolic Names
-
+
diff --git a/doc/html/boost_regex/syntax/leftmost_longest_rule.html b/doc/html/boost_regex/syntax/leftmost_longest_rule.html
index 951db6aa..4ea80846 100644
--- a/doc/html/boost_regex/syntax/leftmost_longest_rule.html
+++ b/doc/html/boost_regex/syntax/leftmost_longest_rule.html
@@ -3,7 +3,7 @@
The Leftmost Longest Rule
-
+
diff --git a/doc/html/boost_regex/syntax/perl_syntax.html b/doc/html/boost_regex/syntax/perl_syntax.html
index b4f5427f..88b5fdb0 100644
--- a/doc/html/boost_regex/syntax/perl_syntax.html
+++ b/doc/html/boost_regex/syntax/perl_syntax.html
@@ -3,7 +3,7 @@
Perl Regular Expression Syntax
-
+
@@ -28,7 +28,7 @@
Syntax
@@ -45,7 +45,7 @@
boost :: regex e2 ( my_expression , boost :: regex :: perl | boost :: regex :: icase );
@@ -55,7 +55,7 @@
.[{()\*+?|^$
@@ -75,7 +75,7 @@
@@ -85,7 +85,7 @@
A '$' character shall match the end of a line.
@@ -97,7 +97,7 @@
to by a back-reference.
@@ -111,7 +111,7 @@
out any separate sub-expressions.
@@ -197,7 +197,7 @@
operator to be applied to.
@@ -227,8 +227,40 @@
Matches the previous atom between n and m times, while consuming as little
input as possible.
+
+
+ By default when a repeated patten does not match then the engine will backtrack
+ until a match is found. However, this behaviour can sometime be undesireable
+ so there are also "pocessive" repeats: these match as much as possible
+ and do not then allow backtracking if the rest of the expression fails to
+ match.
+
+
+ *+
Matches the previous atom
+ zero or more times, while giving nothing back.
+
+
+ ++
Matches the previous atom
+ one or more times, while giving nothing back.
+
+
+ ?+
Matches the previous atom
+ zero or one times, while giving nothing back.
+
+
+ { n ,}+
Matches the previous atom n or more times,
+ while giving nothing back.
+
+
+ { n , m }+
+ Matches the previous atom between n and m times, while giving nothing back.
+
@@ -248,7 +280,7 @@
aaabba
@@ -277,7 +309,7 @@
(?: abc )??
has exactly the same effect.
@@ -290,7 +322,7 @@
A bracket expression may contain any combination of the following:
@@ -298,7 +330,7 @@
or 'c'.
@@ -311,7 +343,7 @@
regular expression, then ranges are locale sensitive.
@@ -320,7 +352,7 @@
range a - c
.
@@ -330,7 +362,7 @@
character class names .
@@ -354,7 +386,7 @@
character.
@@ -371,7 +403,7 @@
or even all locales on one platform.
@@ -383,7 +415,7 @@
is not a "word" character.
@@ -391,7 +423,7 @@
[[: digit :] a - c [. NUL .]]
.
@@ -584,7 +616,7 @@
@@ -676,6 +708,30 @@
+
+
+ \ h
+
+
+
+
+ Horizontal whitespace
+
+
+
+
+
+
+ \ v
+
+
+
+
+ Vertical whitespace
+
+
+
+
\ D
@@ -735,10 +791,34 @@
+
+
+
+ \ H
+
+
+
+
+ Not Horizontal whitespace
+
+
+
+
+
+
+ \ V
+
+
+
+
+ Not Vertical whitespace
+
+
+
@@ -846,7 +926,7 @@
matches any "digit" character, as does \ p { digit }
.
@@ -868,7 +948,7 @@
Matches only when not at a word boundary.
@@ -893,7 +973,7 @@
to the regular expression \ n *\ z
@@ -905,7 +985,7 @@
match to start where the last one ended.
@@ -918,7 +998,7 @@
\*+ aaa
@@ -929,7 +1009,7 @@
combining characters.
@@ -938,7 +1018,7 @@
\@ matches a literal '@'.
@@ -947,7 +1027,7 @@
(?
.
@@ -956,7 +1036,7 @@
are ignored.
@@ -971,7 +1051,7 @@
applies the specified modifiers to pattern only.
@@ -980,7 +1060,7 @@
an additional sub-expression.
@@ -1003,7 +1083,7 @@
could be used to validate the password.
@@ -1017,7 +1097,7 @@
(pattern must be of fixed length).
@@ -1030,7 +1110,7 @@
no match is found at all.
@@ -1050,7 +1130,7 @@
sub-expression has been matched).
@@ -1086,7 +1166,7 @@
@@ -1271,7 +1351,7 @@
@@ -1280,7 +1360,7 @@
JavaScript
and JScript
are all synonyms for perl
.
@@ -1293,7 +1373,7 @@
sensitivity are to be applied.
@@ -1305,7 +1385,7 @@
and no_mod_s
.
diff --git a/doc/html/boost_regex/unicode.html b/doc/html/boost_regex/unicode.html
index 85678400..00b14229 100644
--- a/doc/html/boost_regex/unicode.html
+++ b/doc/html/boost_regex/unicode.html
@@ -3,7 +3,7 @@
Unicode and Boost.Regex
-
+
@@ -30,7 +30,7 @@
There are two ways to use Boost.Regex with Unicode strings:
@@ -56,7 +56,7 @@
diff --git a/doc/html/index.html b/doc/html/index.html
index 9b623b67..365165f2 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -3,7 +3,7 @@
Boost.Regex
-
+
@@ -28,7 +28,7 @@
Copyright © 1998 -2007 John Maddock
-Last revised: December 23, 2008 at 17:35:37 GMT
+Last revised: April 23, 2009 at 09:45:24 GMT
diff --git a/doc/syntax_perl.qbk b/doc/syntax_perl.qbk
index 9a76276d..b3b4056f 100644
--- a/doc/syntax_perl.qbk
+++ b/doc/syntax_perl.qbk
@@ -143,6 +143,23 @@ consume as little input as possible while still producing a match.
`{n,m}?` Matches the previous atom between n and m times, while
consuming as little input as possible.
+[h4 Pocessive repeats]
+
+By default when a repeated patten does not match then the engine will backtrack until
+a match is found. However, this behaviour can sometime be undesireable so there are
+also "pocessive" repeats: these match as much as possible and do not then allow
+backtracking if the rest of the expression fails to match.
+
+`*+` Matches the previous atom zero or more times, while giving nothing back.
+
+`++` Matches the previous atom one or more times, while giving nothing back.
+
+`?+` Matches the previous atom zero or one times, while giving nothing back.
+
+`{n,}+` Matches the previous atom n or more times, while giving nothing back.
+
+`{n,m}+` Matches the previous atom between n and m times, while giving nothing back.
+
[h4 Back references]
An escape character followed by a digit /n/, where /n/ is in the range 1-9,
@@ -296,11 +313,15 @@ The following are supported by default:
[[`\s`][`[[:space:]]`]]
[[`\u`][`[[:upper:]]`]]
[[`\w`][`[[:word:]]`]]
+[[`\h`][Horizontal whitespace]]
+[[`\v`][Vertical whitespace]]
[[`\D`][`[^[:digit:]]`]]
[[`\L`][`[^[:lower:]]`]]
[[`\S`][`[^[:space:]]`]]
[[`\U`][`[^[:upper:]]`]]
[[`\W`][`[^[:word:]]`]]
+[[`\H`][Not Horizontal whitespace]]
+[[`\V`][Not Vertical whitespace]]
]
[h5 Character Properties]
diff --git a/include/boost/regex/icu.hpp b/include/boost/regex/icu.hpp
index 2cf37e5c..24715572 100644
--- a/include/boost/regex/icu.hpp
+++ b/include/boost/regex/icu.hpp
@@ -184,7 +184,9 @@ private:
offset_underscore = U_CHAR_CATEGORY_COUNT+3,
offset_unicode = U_CHAR_CATEGORY_COUNT+4,
offset_any = U_CHAR_CATEGORY_COUNT+5,
- offset_ascii = U_CHAR_CATEGORY_COUNT+6
+ offset_ascii = U_CHAR_CATEGORY_COUNT+6,
+ offset_horizontal = U_CHAR_CATEGORY_COUNT+7,
+ offset_vertical = U_CHAR_CATEGORY_COUNT+8
};
//
@@ -197,6 +199,8 @@ private:
static const char_class_type mask_unicode;
static const char_class_type mask_any;
static const char_class_type mask_ascii;
+ static const char_class_type mask_horizontal;
+ static const char_class_type mask_vertical;
static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp
index 9cc4abe8..065a2d80 100644
--- a/include/boost/regex/v4/basic_regex_parser.hpp
+++ b/include/boost/regex/v4/basic_regex_parser.hpp
@@ -610,6 +610,7 @@ bool basic_regex_parser
::parse_extended_escape()
// fall through:
case regex_constants::escape_type_class:
{
+escape_type_class_jump:
typedef typename traits::char_class_type mask_type;
mask_type m = this->m_traits.lookup_classname(m_position, m_position+1);
if(m != 0)
@@ -720,6 +721,10 @@ bool basic_regex_parser::parse_extended_escape()
}
fail(regex_constants::error_ctype, m_position - m_base);
}
+ case regex_constants::escape_type_control_v:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ goto escape_type_class_jump;
+ // fallthrough:
default:
this->append_literal(unescape_character());
break;
@@ -747,6 +752,7 @@ template
bool basic_regex_parser::parse_repeat(std::size_t low, std::size_t high)
{
bool greedy = true;
+ bool pocessive = false;
std::size_t insert_point;
//
// when we get to here we may have a non-greedy ? mark still to come:
@@ -758,12 +764,19 @@ bool basic_regex_parser::parse_repeat(std::size_t low, std::size_
)
)
{
- // OK we have a perl regex, check for a '?':
+ // OK we have a perl or emacs regex, check for a '?':
if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question)
{
greedy = false;
++m_position;
}
+ // for perl regexes only check for pocessive ++ repeats.
+ if((0 == (this->flags() & regbase::main_option_type))
+ && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
+ {
+ pocessive = true;
+ ++m_position;
+ }
}
if(0 == this->m_last_state)
{
@@ -832,6 +845,20 @@ bool basic_regex_parser::parse_repeat(std::size_t low, std::size_
// now fill in the alt jump for the repeat:
rep = static_cast(this->getaddress(rep_off));
rep->alt.i = this->m_pdata->m_data.size() - rep_off;
+ //
+ // If the repeat is pocessive then bracket the repeat with a (?>...)
+ // independent sub-expression construct:
+ //
+ if(pocessive)
+ {
+ re_brace* pb = static_cast(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace)));
+ pb->index = -3;
+ re_jump* jmp = static_cast(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(this->append_state(syntax_element_endmark, sizeof(re_brace)));
+ pb->index = -3;
+ }
return true;
}
diff --git a/include/boost/regex/v4/cpp_regex_traits.hpp b/include/boost/regex/v4/cpp_regex_traits.hpp
index 89fe49d8..7ce3ed30 100644
--- a/include/boost/regex/v4/cpp_regex_traits.hpp
+++ b/include/boost/regex/v4/cpp_regex_traits.hpp
@@ -394,7 +394,9 @@ enum
char_class_graph=char_class_alnum|char_class_punct,
char_class_blank=1<<9,
char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal_space=1<<12,
+ char_class_vertical_space=1<<13
};
#endif
@@ -413,6 +415,8 @@ public:
BOOST_STATIC_CONSTANT(char_class_type, mask_blank = 1u << 24);
BOOST_STATIC_CONSTANT(char_class_type, mask_word = 1u << 25);
BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 1u << 26);
+ BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 1u << 27);
+ BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 1u << 28);
#endif
typedef std::basic_string string_type;
@@ -477,6 +481,10 @@ template
typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_word;
template
typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_unicode;
+template
+typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_vertical;
+template
+typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_horizontal;
#endif
#endif
@@ -688,18 +696,20 @@ void cpp_regex_traits_implementation::init()
// Custom class names:
//
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
- static const char_class_type masks[14] =
+ static const char_class_type masks[16] =
{
std::ctype::alnum,
std::ctype::alpha,
std::ctype::cntrl,
std::ctype::digit,
std::ctype::graph,
+ cpp_regex_traits_implementation::mask_horizontal,
std::ctype::lower,
std::ctype::print,
std::ctype::punct,
std::ctype::space,
std::ctype::upper,
+ cpp_regex_traits_implementation::mask_vertical,
std::ctype::xdigit,
cpp_regex_traits_implementation::mask_blank,
cpp_regex_traits_implementation::mask_word,
@@ -713,11 +723,13 @@ void cpp_regex_traits_implementation::init()
::boost::re_detail::char_class_cntrl,
::boost::re_detail::char_class_digit,
::boost::re_detail::char_class_graph,
+ ::boost::re_detail::char_class_horizontal_space,
::boost::re_detail::char_class_lower,
::boost::re_detail::char_class_print,
::boost::re_detail::char_class_punct,
::boost::re_detail::char_class_space,
::boost::re_detail::char_class_upper,
+ ::boost::re_detail::char_class_vertical_space,
::boost::re_detail::char_class_xdigit,
::boost::re_detail::char_class_blank,
::boost::re_detail::char_class_word,
@@ -744,7 +756,7 @@ typename cpp_regex_traits_implementation::char_class_type
cpp_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const
{
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
- static const char_class_type masks[20] =
+ static const char_class_type masks[22] =
{
0,
std::ctype::alnum,
@@ -754,6 +766,7 @@ typename cpp_regex_traits_implementation::char_class_type
std::ctype::digit,
std::ctype::digit,
std::ctype::graph,
+ cpp_regex_traits_implementation::mask_horizontal,
std::ctype::lower,
std::ctype::lower,
std::ctype::print,
@@ -763,12 +776,13 @@ typename cpp_regex_traits_implementation::char_class_type
std::ctype::upper,
cpp_regex_traits_implementation::mask_unicode,
std::ctype::upper,
+ cpp_regex_traits_implementation::mask_vertical,
std::ctype::alnum | cpp_regex_traits_implementation::mask_word,
std::ctype::alnum | cpp_regex_traits_implementation::mask_word,
std::ctype::xdigit,
};
#else
- static const char_class_type masks[20] =
+ static const char_class_type masks[22] =
{
0,
::boost::re_detail::char_class_alnum,
@@ -778,6 +792,7 @@ typename cpp_regex_traits_implementation::char_class_type
::boost::re_detail::char_class_digit,
::boost::re_detail::char_class_digit,
::boost::re_detail::char_class_graph,
+ ::boost::re_detail::char_class_horizontal_space,
::boost::re_detail::char_class_lower,
::boost::re_detail::char_class_lower,
::boost::re_detail::char_class_print,
@@ -787,6 +802,7 @@ typename cpp_regex_traits_implementation::char_class_type
::boost::re_detail::char_class_upper,
::boost::re_detail::char_class_unicode,
::boost::re_detail::char_class_upper,
+ ::boost::re_detail::char_class_vertical_space,
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
::boost::re_detail::char_class_xdigit,
@@ -820,7 +836,9 @@ bool cpp_regex_traits_implementation::isctype(const charT c, char_class_t
|| ((mask & ::boost::re_detail::char_class_xdigit) && (m_pctype->is(std::ctype::xdigit, c)))
|| ((mask & ::boost::re_detail::char_class_blank) && (m_pctype->is(std::ctype::space, c)) && !::boost::re_detail::is_separator(c))
|| ((mask & ::boost::re_detail::char_class_word) && (c == '_'))
- || ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c));
+ || ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c))
+ || ((mask & ::boost::re_detail::char_class_vertical) && (is_separator(c) || (c == '\v')))
+ || ((mask & ::boost::re_detail::char_class_horizontal) && m_pctype->is(std::ctype::space, c) && !(is_separator(c) || (c == '\v')));
}
#endif
@@ -930,6 +948,12 @@ public:
&& m_pimpl->m_pctype->is(std::ctype::space, c)
&& !re_detail::is_separator(c))
return true;
+ else if((f & re_detail::cpp_regex_traits_implementation::mask_vertical)
+ && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ return true;
+ else if((f & re_detail::cpp_regex_traits_implementation::mask_horizontal)
+ && this->isctype(c, std::ctype::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation::mask_vertical))
+ return true;
return false;
#else
return m_pimpl->isctype(c, f);
diff --git a/include/boost/regex/v4/regex_traits_defaults.hpp b/include/boost/regex/v4/regex_traits_defaults.hpp
index 42428dd8..8f33d2c8 100644
--- a/include/boost/regex/v4/regex_traits_defaults.hpp
+++ b/include/boost/regex/v4/regex_traits_defaults.hpp
@@ -159,7 +159,7 @@ struct character_pointer_range
template
int get_default_class_id(const charT* p1, const charT* p2)
{
- static const charT data[72] = {
+ static const charT data[73] = {
'a', 'l', 'n', 'u', 'm',
'a', 'l', 'p', 'h', 'a',
'b', 'l', 'a', 'n', 'k',
@@ -172,11 +172,12 @@ int get_default_class_id(const charT* p1, const charT* p2)
's', 'p', 'a', 'c', 'e',
'u', 'n', 'i', 'c', 'o', 'd', 'e',
'u', 'p', 'p', 'e', 'r',
+ 'v',
'w', 'o', 'r', 'd',
'x', 'd', 'i', 'g', 'i', 't',
};
- static const character_pointer_range ranges[19] =
+ static const character_pointer_range ranges[21] =
{
{data+0, data+5,}, // alnum
{data+5, data+10,}, // alpha
@@ -185,6 +186,7 @@ int get_default_class_id(const charT* p1, const charT* p2)
{data+20, data+21,}, // d
{data+20, data+25,}, // digit
{data+25, data+30,}, // graph
+ {data+29, data+30,}, // h
{data+30, data+31,}, // l
{data+30, data+35,}, // lower
{data+35, data+40,}, // print
@@ -194,9 +196,10 @@ int get_default_class_id(const charT* p1, const charT* p2)
{data+57, data+58,}, // u
{data+50, data+57,}, // unicode
{data+57, data+62,}, // upper
- {data+62, data+63,}, // w
- {data+62, data+66,}, // word
- {data+66, data+72,}, // xdigit
+ {data+62, data+63,}, // v
+ {data+63, data+64,}, // w
+ {data+63, data+67,}, // word
+ {data+67, data+73,}, // xdigit
};
static const character_pointer_range* ranges_begin = ranges;
static const character_pointer_range* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
diff --git a/include/boost/regex/v4/w32_regex_traits.hpp b/include/boost/regex/v4/w32_regex_traits.hpp
index 21a9694a..d5562072 100644
--- a/include/boost/regex/v4/w32_regex_traits.hpp
+++ b/include/boost/regex/v4/w32_regex_traits.hpp
@@ -294,6 +294,8 @@ public:
typedef typename w32_regex_traits::char_class_type char_class_type;
BOOST_STATIC_CONSTANT(char_class_type, mask_word = 0x0400); // must be C1_DEFINED << 1
BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 0x0800); // must be C1_DEFINED << 2
+ BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 0x1000); // must be C1_DEFINED << 3
+ BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 0x2000); // must be C1_DEFINED << 4
BOOST_STATIC_CONSTANT(char_class_type, mask_base = 0x3ff); // all the masks used by the CT_CTYPE1 group
typedef std::basic_string string_type;
@@ -510,7 +512,7 @@ template
typename w32_regex_traits_implementation::char_class_type
w32_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const
{
- static const char_class_type masks[20] =
+ static const char_class_type masks[22] =
{
0,
0x0104u, // C1_ALPHA | C1_DIGIT
@@ -520,6 +522,7 @@ typename w32_regex_traits_implementation::char_class_type
0x0004u, // C1_DIGIT
0x0004u, // C1_DIGIT
(~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK
+ w32_regex_traits_implementation::mask_horizontal,
0x0002u, // C1_LOWER
0x0002u, // C1_LOWER
(~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
@@ -529,6 +532,7 @@ typename w32_regex_traits_implementation::char_class_type
0x0001u, // C1_UPPER
w32_regex_traits_implementation::mask_unicode,
0x0001u, // C1_UPPER
+ w32_regex_traits_implementation::mask_vertical,
0x0104u | w32_regex_traits_implementation::mask_word,
0x0104u | w32_regex_traits_implementation::mask_word,
0x0080u, // C1_XDIGIT
@@ -628,6 +632,12 @@ public:
return true;
else if((f & re_detail::w32_regex_traits_implementation::mask_word) && (c == '_'))
return true;
+ else if((f & re_detail::w32_regex_traits_implementation::mask_vertical)
+ && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ return true;
+ else if((f & re_detail::w32_regex_traits_implementation::mask_horizontal)
+ && this->isctype(c, 0x0008u) && !this->isctype(c, re_detail::w32_regex_traits_implementation::mask_vertical))
+ return true;
return false;
}
int toi(const charT*& p1, const charT* p2, int radix)const
diff --git a/src/c_regex_traits.cpp b/src/c_regex_traits.cpp
index da960eb0..6466bc42 100644
--- a/src/c_regex_traits.cpp
+++ b/src/c_regex_traits.cpp
@@ -122,7 +122,9 @@ enum
char_class_graph=char_class_alnum|char_class_punct,
char_class_blank=1<<9,
char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal=1<<12,
+ char_class_vertical=1<<13
};
c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::lookup_classname(const char* p1, const char* p2)
@@ -137,6 +139,7 @@ c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::loo
char_class_digit,
char_class_digit,
char_class_graph,
+ char_class_horizontal,
char_class_lower,
char_class_lower,
char_class_print,
@@ -146,6 +149,7 @@ c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::loo
char_class_upper,
char_class_unicode,
char_class_upper,
+ char_class_vertical,
char_class_alnum | char_class_word,
char_class_alnum | char_class_word,
char_class_xdigit,
@@ -176,7 +180,9 @@ bool BOOST_REGEX_CALL c_regex_traits::isctype(char c, char_class_type mask
|| ((mask & char_class_punct) && (std::ispunct)(static_cast(c)))
|| ((mask & char_class_xdigit) && (std::isxdigit)(static_cast(c)))
|| ((mask & char_class_blank) && (std::isspace)(static_cast(c)) && !::boost::re_detail::is_separator(c))
- || ((mask & char_class_word) && (c == '_'));
+ || ((mask & char_class_word) && (c == '_'))
+ || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ || ((mask & char_class_horizontal) && (std::isspace)(static_cast(c)) && !::boost::re_detail::is_separator(c) && (c != '\v'));
}
c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::lookup_collatename(const char* p1, const char* p2)
diff --git a/src/icu.cpp b/src/icu.cpp
index e06c3176..a815e915 100644
--- a/src/icu.cpp
+++ b/src/icu.cpp
@@ -101,6 +101,8 @@ const icu_regex_traits::char_class_type icu_regex_traits::mask_underscore = icu_
const icu_regex_traits::char_class_type icu_regex_traits::mask_unicode = icu_regex_traits::char_class_type(1) << offset_unicode;
const icu_regex_traits::char_class_type icu_regex_traits::mask_any = icu_regex_traits::char_class_type(1) << offset_any;
const icu_regex_traits::char_class_type icu_regex_traits::mask_ascii = icu_regex_traits::char_class_type(1) << offset_ascii;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_horizontal = icu_regex_traits::char_class_type(1) << offset_horizontal;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_vertical = icu_regex_traits::char_class_type(1) << offset_vertical;
icu_regex_traits::char_class_type icu_regex_traits::lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2)
{
@@ -370,6 +372,7 @@ icu_regex_traits::char_class_type icu_regex_traits::lookup_classname(const char_
U_GC_ND_MASK,
U_GC_ND_MASK,
(0x3FFFFFFFu) & ~(U_GC_CC_MASK | U_GC_CF_MASK | U_GC_CS_MASK | U_GC_CN_MASK | U_GC_Z_MASK),
+ mask_horizontal,
U_GC_LL_MASK,
U_GC_LL_MASK,
~(U_GC_C_MASK),
@@ -379,6 +382,7 @@ icu_regex_traits::char_class_type icu_regex_traits::lookup_classname(const char_
U_GC_LU_MASK,
mask_unicode,
U_GC_LU_MASK,
+ mask_vertical,
char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
char_class_type(U_GC_ND_MASK) | mask_xdigit,
@@ -487,6 +491,10 @@ bool icu_regex_traits::isctype(char_type c, char_class_type f) const
return true;
if(((f & mask_ascii) != 0) && (c <= 0x7F))
return true;
+ if(((f & mask_vertical) != 0) && (::boost::re_detail::is_separator(c) || (c == static_cast('\v')) || (m == U_GC_ZL_MASK) || (m == U_GC_ZP_MASK)))
+ return true;
+ if(((f & mask_horizontal) != 0) && !::boost::re_detail::is_separator(c) && u_isspace(c) && (c != static_cast('\v')))
+ return true;
return false;
}
diff --git a/src/wc_regex_traits.cpp b/src/wc_regex_traits.cpp
index 3640f292..cff9d185 100644
--- a/src/wc_regex_traits.cpp
+++ b/src/wc_regex_traits.cpp
@@ -161,7 +161,9 @@ enum
char_class_graph=char_class_alnum|char_class_punct,
char_class_blank=1<<9,
char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal=1<<12,
+ char_class_vertical=1<<13
};
c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::lookup_classname(const wchar_t* p1, const wchar_t* p2)
@@ -176,6 +178,7 @@ c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::isctype(wchar_t c, char_class_typ
|| ((mask & char_class_xdigit) && (std::iswxdigit)(c))
|| ((mask & char_class_blank) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c))
|| ((mask & char_class_word) && (c == '_'))
- || ((mask & char_class_unicode) && (c & ~static_cast(0xff)));
+ || ((mask & char_class_unicode) && (c & ~static_cast(0xff)))
+ || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == L'\v')))
+ || ((mask & char_class_horizontal) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c) && (c != L'\v'));
}
c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::lookup_collatename(const wchar_t* p1, const wchar_t* p2)
diff --git a/test/regress/main.cpp b/test/regress/main.cpp
index ffbe5efe..73692208 100644
--- a/test/regress/main.cpp
+++ b/test/regress/main.cpp
@@ -40,6 +40,7 @@ int error_count = 0;
void run_tests()
{
+ RUN_TESTS(test_pocessive_repeats);
RUN_TESTS(basic_tests);
RUN_TESTS(test_simple_repeats);
RUN_TESTS(test_alt);
diff --git a/test/regress/test.hpp b/test/regress/test.hpp
index 046b2d56..e812aa94 100644
--- a/test/regress/test.hpp
+++ b/test/regress/test.hpp
@@ -258,6 +258,6 @@ void test_emacs();
void test_operators();
void test_overloads();
void test_unicode();
-
+void test_pocessive_repeats();
#endif
diff --git a/test/regress/test_non_greedy_repeats.cpp b/test/regress/test_non_greedy_repeats.cpp
index 5cf507d2..c9935bd8 100644
--- a/test/regress/test_non_greedy_repeats.cpp
+++ b/test/regress/test_non_greedy_repeats.cpp
@@ -41,6 +41,6 @@ void test_non_greedy_repeats()
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);
+ //TEST_INVALID_REGEX("a++", perl);
}
diff --git a/test/regress/test_sets.cpp b/test/regress/test_sets.cpp
index 61374819..3cd7a520 100644
--- a/test/regress/test_sets.cpp
+++ b/test/regress/test_sets.cpp
@@ -266,6 +266,10 @@ void test_sets2()
TEST_REGEX_SEARCH("[\\W]+", perl, "AB_ AB", match_default, make_array(3, 6, -2, -2));
TEST_REGEX_SEARCH("[[:^word:]]+", perl, "AB_ AB", match_default, make_array(3, 6, -2, -2));
TEST_REGEX_SEARCH("\\W+", perl, "AB_ AB", match_default, make_array(3, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\h+", perl, "\v\f\r\n \t\n", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\V+", perl, "\v\f\r\n \t\n", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\H+", perl, " \t\v\f\r\n ", match_default, make_array(2, 6, -2, -2));
+ TEST_REGEX_SEARCH("\\v+", perl, " \t\v\f\r\n ", match_default, make_array(2, 6, -2, -2));
test_sets2c();
}
diff --git a/test/regress/test_simple_repeats.cpp b/test/regress/test_simple_repeats.cpp
index 6811e5f9..690c71eb 100644
--- a/test/regress/test_simple_repeats.cpp
+++ b/test/regress/test_simple_repeats.cpp
@@ -436,3 +436,44 @@ void test_fast_repeats2()
}
+void test_pocessive_repeats()
+{
+ using namespace boost::regex_constants;
+ // and again for sets:
+ TEST_REGEX_SEARCH("^(\\w++|\\s++)*$", perl, "now is the time for all good men to come to the aid of the party", match_default, make_array(0, 64, 59, 64, -2, -2));
+ TEST_REGEX_SEARCH("^(\\w++|\\s++)*$", perl, "this is not a line with only words and spaces!", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(\\d++)(\\w)", perl, "12345a", match_default, make_array(0, 6, 0, 5, 5, 6, -2, -2));
+ TEST_REGEX_SEARCH("(\\d++)(\\w)", perl, "12345+", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("(\\d++)(\\w)", perl, "12345", match_default, make_array(-2, -2));
+ TEST_REGEX_SEARCH("a++b", perl, "aaab", match_default, make_array(0, 4, -2, -2));
+ TEST_REGEX_SEARCH("(a++b)", perl, "aaab", match_default, make_array(0, 4, 0, 4, -2, -2));
+ TEST_REGEX_SEARCH("([^()]++|\\([^()]*\\))+", perl, "((abc(ade)ufh()()x", match_default, make_array(2, 18, 17, 18, -2, -2));
+ TEST_REGEX_SEARCH("\\(([^()]++|\\([^()]+\\))+\\)", perl, "(abc)", match_default, make_array(0, 5, 1, 4, -2, -2));
+ TEST_REGEX_SEARCH("\\(([^()]++|\\([^()]+\\))+\\)", perl, "(abc(def)xyz)", match_default, make_array(0, 13, 9, 12, -2, -2));
+ TEST_REGEX_SEARCH("\\(([^()]++|\\([^()]+\\))+\\)", perl, "((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", match_default, make_array(-2, -2));
+ /*
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "<>", match_default, make_array(0, 2, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "", match_default, make_array(0, 6, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, " hij>", match_default, make_array(0, 15, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, " hij>", match_default, make_array(5, 10, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "def>", match_default, make_array(0, 10, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "", match_default, make_array(4, 6, -2, -2));
+ TEST_REGEX_SEARCH("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", perl|mod_x, "]*+) | (?2)) * >))", perl|mod_x, "<>", match_default, make_array(0, 2, 0, 2, 0, 2, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "", match_default, make_array(0, 6, 0, 6, 0, 6, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, " hij>", match_default, make_array(0, 15, 0, 15, 0, 15, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, " hij>", match_default, make_array(5, 10, 5, 10, 5, 10, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "def>", match_default, make_array(0, 10, 0, 10, 0, 10, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "", match_default, make_array(4, 6, 4, 6, 4, 6, -2, -2));
+ TEST_REGEX_SEARCH("((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))", perl|mod_x, "