diff --git a/build/Jamfile b/build/Jamfile
index 98c800c1..e137a932 100644
--- a/build/Jamfile
+++ b/build/Jamfile
@@ -1,3 +1,5 @@
+# copyright John Maddock 2003
+
subproject libs/regex/build ;
SOURCES = c_regex_traits c_regex_traits_common cpp_regex_traits
@@ -143,3 +145,4 @@ stage bin-stage : #include <boost/pattern_except.hpp> #include <boost/pattern_except.hpp> The class The template class basic_regex encapsulates regular
diff --git a/doc/Attic/contacts.html b/doc/Attic/contacts.html
index f459d203..2f12281e 100644
--- a/doc/Attic/contacts.html
+++ b/doc/Attic/contacts.html
@@ -38,7 +38,7 @@ border="0">
john_maddock@compuserve.com, the home page for this library is
at
http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm,
-and the official boost version can be obtained from www.boost.org/libraries.htm.
Synopsis
- bad_expression
defines the type of objects thrown as
exceptions to report errors during the conversion from a string representing a
regular expression to a finite state machine. Synopsis
-#include <boost/regex.hpp>
+#include <boost/regex.hpp>
I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think about algorithms and their performance, and to diff --git a/doc/Attic/format_syntax.html b/doc/Attic/format_syntax.html index c267528d..36604d39 100644 --- a/doc/Attic/format_syntax.html +++ b/doc/Attic/format_syntax.html @@ -34,7 +34,7 @@ border="0">
Format strings are used by the algorithm regex_merge and by Format strings are used by the algorithm regex_replace and by match_results::format, and are used to transform one string into another.
diff --git a/doc/Attic/install.html b/doc/Attic/install.html index 66f0b18b..9e111922 100644 --- a/doc/Attic/install.html +++ b/doc/Attic/install.html @@ -23,12 +23,6 @@[ Important: If you are upgrading from the - 2.x version of this library then you will find a number of changes to the - documented header names and library interfaces, existing code should still - compile unchanged however - see - Note for Upgraders. ]
When you extract the library from its zip file, you must preserve its internal directory structure (for example by using the -d option when extracting). If you didn't do that when extracting, then you'd better stop reading this, delete @@ -37,7 +31,7 @@
This library should not need configuring before use; most popular compilers/standard libraries/platforms are already supported "as is". If you do experience configuration problems, or just want to test the configuration with - your compiler, then the process is the same as for all of boost; see the + your compiler, then the process is the same as for all of boost; see the configuration library documentation.
The library will encase all code inside namespace boost.
@@ -187,7 +181,7 @@LDFLAGS: additional linker options.
LIBS: additional library files.
For the more adventurous there is a configure script in - <boost>/libs/config; see the config library + <boost>/libs/config; see the config library documentation.
There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the @@ -214,14 +208,14 @@
will build v9 variants of the regex library named libboost_regex_v9.a etc.
-There is a generic makefile (generic.mak +
There is a generic makefile (generic.mak ) provided in <boost-root>/libs/regex/build - see that makefile for details of environment variables that need to be set before use.
- Alternatively you can using the Jam based + Alternatively you can using the Jam based build system: cd into <boost>/libs/regex/build and run:
bjam -sTOOLS=mytoolset
- If you need to configure the library for your platform, then refer to the + If you need to configure the library for your platform, then refer to the config library documentation .
diff --git a/doc/Attic/match_results.html b/doc/Attic/match_results.html index 9acc3afc..9c2d3c64 100644 --- a/doc/Attic/match_results.html +++ b/doc/Attic/match_results.html @@ -44,7 +44,7 @@ border="0">
#include <boost/regex.hpp>
+#include <boost/regex.hpp>
Regular expressions are different from many simple pattern-matching algorithms in that as well as finding an overall @@ -59,7 +59,7 @@ sub_match .
Template class match_results denotes a collection of character sequences representing the result of a regular expression match. -Objects of type match_results are passed to the algorithms regex_match and +Objects of type match_results are passed to the algorithms regex_match and regex_search, and are returned by the iterator regex_iterator . Storage for the collection is allocated and freed as necessary by the member functions of class match_results.
diff --git a/doc/Attic/regex.html b/doc/Attic/regex.html index 785caf87..af871319 100644 --- a/doc/Attic/regex.html +++ b/doc/Attic/regex.html @@ -470,7 +470,7 @@ determine what gets matched, and how the format string should be treated. If copy is true then all unmatched sections of input are copied unchanged to output, if the flag format_first_only is set then only the first occurance of the -pattern found is replaced. Returns the new string. See also format string syntax, match flags and format flags. +pattern found is replaced. Returns the new string. See also format string syntax, match flags and format flags.-#include <boost/regex.hpp> +#include <boost/regex.hpp>
The algorithm regex_format takes the results of a match and diff --git a/doc/Attic/regex_grep.html b/doc/Attic/regex_grep.html index 0c6f1218..ca226c24 100644 --- a/doc/Attic/regex_grep.html +++ b/doc/Attic/regex_grep.html @@ -31,7 +31,7 @@ and will not be updated in future.
-#include <boost/regex.hpp> +#include <boost/regex.hpp>
regex_grep allows you to search through a bidirectional-iterator range and locate all the (non-overlapping) matches with a given regular expression. The diff --git a/doc/Attic/regex_match.html b/doc/Attic/regex_match.html index 1345180b..309d33d4 100644 --- a/doc/Attic/regex_match.html +++ b/doc/Attic/regex_match.html @@ -30,7 +30,7 @@ Examples
#include <boost/regex.hpp>+
#include <boost/regex.hpp>
The algorithm regex _match determines whether a given regular expression
matches a given sequence denoted by a pair of bidirectional-iterators, the
algorithm is defined as follows, note that the result is true only if the
diff --git a/doc/Attic/regex_replace.html b/doc/Attic/regex_replace.html
index 1e13b553..8ff9764d 100644
--- a/doc/Attic/regex_replace.html
+++ b/doc/Attic/regex_replace.html
@@ -32,8 +32,8 @@
all the matches to the regular expression: for each match it then calls
match_results::format to format the string and sends the result to the
output iterator. Sections of text that do not match are copied to the output
- unchanged only if the flags parameter does not have the flag
- format_no_copy set. If the flag format_first_only
+ unchanged only if the flags parameter does not have the flag
+ format_no_copy set. If the flag format_first_only
is set then only the first occurrence is replaced rather than all
occurrences. The algorithm regex_search will search a range denoted by a pair of
bidirectional-iterators for a given regular expression. The algorithm uses
diff --git a/doc/Attic/sub_match.html b/doc/Attic/sub_match.html
index db995312..19b12c8d 100644
--- a/doc/Attic/sub_match.html
+++ b/doc/Attic/sub_match.html
@@ -24,14 +24,14 @@
#include <boost/regex.hpp>
+ #include <boost/regex.hpp>
Regular expressions are different from many simple pattern-matching algorithms
in that as well as finding an overall match they can also produce
sub-expression matches: each sub-expression being delimited in the pattern by a
pair of parenthesis (...). There has to be some method for reporting
sub-expression matches back to the user: this is achieved this by defining a
- class match_results that acts as an
+ class match_results that acts as an
indexed collection of sub-expression matches, each sub-expression match being
contained in an object of type sub_match
.
diff --git a/doc/Attic/syntax.html b/doc/Attic/syntax.html
index f776cd3c..3d39d9d2 100644
--- a/doc/Attic/syntax.html
+++ b/doc/Attic/syntax.html
@@ -90,10 +90,10 @@
Parentheses serve two purposes, to group items together into a sub-expression,
and to mark what generated the match. For example the expression "(ab)*" would
- match all of the string "ababab". The matching algorithms
- regex_match and regex_search
- each take an instance of match_results
- that reports what caused the match, on exit from these functions the
+ match all of the string "ababab". The matching algorithms
+ regex_match and regex_search
+ each take an instance of match_results
+ that reports what caused the match, on exit from these functions the
match_results contains information both on what the whole expression
matched and on what each sub-expression matched. In the example above
match_results[1] would contain a pair of iterators denoting the final "ab" of
diff --git a/doc/bad_expression.html b/doc/bad_expression.html
index c6e6d41f..71c42ed1 100644
--- a/doc/bad_expression.html
+++ b/doc/bad_expression.html
@@ -26,7 +26,7 @@
#include <boost/pattern_except.hpp> #include <boost/pattern_except.hpp> The class The template class basic_regex encapsulates regular
diff --git a/doc/contacts.html b/doc/contacts.html
index f459d203..2f12281e 100644
--- a/doc/contacts.html
+++ b/doc/contacts.html
@@ -38,7 +38,7 @@ border="0">
john_maddock@compuserve.com, the home page for this library is
at
http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm,
-and the official boost version can be obtained from www.boost.org/libraries.htm.template <class OutputIterator, class BidirectionalIterator, class traits,
class Allocator, class charT>
diff --git a/doc/Attic/regex_search.html b/doc/Attic/regex_search.html
index a7fcd9b8..97850ba7 100644
--- a/doc/Attic/regex_search.html
+++ b/doc/Attic/regex_search.html
@@ -27,7 +27,7 @@
Synopsis
- #include <boost/regex.hpp>
+ #include <boost/regex.hpp>
Synopsis
-
Synopsis
- bad_expression
defines the type of objects thrown as
exceptions to report errors during the conversion from a string representing a
regular expression to a finite state machine. Synopsis
-#include <boost/regex.hpp>
+#include <boost/regex.hpp>
I am indebted to Robert Sedgewick's "Algorithms in C++" for forcing me to think about algorithms and their performance, and to diff --git a/doc/format_syntax.html b/doc/format_syntax.html index c267528d..36604d39 100644 --- a/doc/format_syntax.html +++ b/doc/format_syntax.html @@ -34,7 +34,7 @@ border="0">
Format strings are used by the algorithm regex_merge and by Format strings are used by the algorithm regex_replace and by match_results::format, and are used to transform one string into another.
diff --git a/doc/install.html b/doc/install.html index 66f0b18b..9e111922 100644 --- a/doc/install.html +++ b/doc/install.html @@ -23,12 +23,6 @@[ Important: If you are upgrading from the - 2.x version of this library then you will find a number of changes to the - documented header names and library interfaces, existing code should still - compile unchanged however - see - Note for Upgraders. ]
When you extract the library from its zip file, you must preserve its internal directory structure (for example by using the -d option when extracting). If you didn't do that when extracting, then you'd better stop reading this, delete @@ -37,7 +31,7 @@
This library should not need configuring before use; most popular compilers/standard libraries/platforms are already supported "as is". If you do experience configuration problems, or just want to test the configuration with - your compiler, then the process is the same as for all of boost; see the + your compiler, then the process is the same as for all of boost; see the configuration library documentation.
The library will encase all code inside namespace boost.
@@ -187,7 +181,7 @@LDFLAGS: additional linker options.
LIBS: additional library files.
For the more adventurous there is a configure script in - <boost>/libs/config; see the config library + <boost>/libs/config; see the config library documentation.
There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the @@ -214,14 +208,14 @@
will build v9 variants of the regex library named libboost_regex_v9.a etc.
-There is a generic makefile (generic.mak +
There is a generic makefile (generic.mak ) provided in <boost-root>/libs/regex/build - see that makefile for details of environment variables that need to be set before use.
- Alternatively you can using the Jam based + Alternatively you can using the Jam based build system: cd into <boost>/libs/regex/build and run:
bjam -sTOOLS=mytoolset
- If you need to configure the library for your platform, then refer to the + If you need to configure the library for your platform, then refer to the config library documentation .
diff --git a/doc/match_results.html b/doc/match_results.html index 9acc3afc..9c2d3c64 100644 --- a/doc/match_results.html +++ b/doc/match_results.html @@ -44,7 +44,7 @@ border="0">
#include <boost/regex.hpp>
+#include <boost/regex.hpp>
Regular expressions are different from many simple pattern-matching algorithms in that as well as finding an overall @@ -59,7 +59,7 @@ sub_match .
Template class match_results denotes a collection of character sequences representing the result of a regular expression match. -Objects of type match_results are passed to the algorithms regex_match and +Objects of type match_results are passed to the algorithms regex_match and regex_search, and are returned by the iterator regex_iterator . Storage for the collection is allocated and freed as necessary by the member functions of class match_results.
diff --git a/doc/regex.html b/doc/regex.html index 785caf87..af871319 100644 --- a/doc/regex.html +++ b/doc/regex.html @@ -470,7 +470,7 @@ determine what gets matched, and how the format string should be treated. If copy is true then all unmatched sections of input are copied unchanged to output, if the flag format_first_only is set then only the first occurance of the -pattern found is replaced. Returns the new string. See also format string syntax, match flags and format flags. +pattern found is replaced. Returns the new string. See also format string syntax, match flags and format flags.-#include <boost/regex.hpp> +#include <boost/regex.hpp>
The algorithm regex_format takes the results of a match and diff --git a/doc/regex_grep.html b/doc/regex_grep.html index 0c6f1218..ca226c24 100644 --- a/doc/regex_grep.html +++ b/doc/regex_grep.html @@ -31,7 +31,7 @@ and will not be updated in future.
-#include <boost/regex.hpp> +#include <boost/regex.hpp>
regex_grep allows you to search through a bidirectional-iterator range and locate all the (non-overlapping) matches with a given regular expression. The diff --git a/doc/regex_match.html b/doc/regex_match.html index 1345180b..309d33d4 100644 --- a/doc/regex_match.html +++ b/doc/regex_match.html @@ -30,7 +30,7 @@ Examples
#include <boost/regex.hpp>+
#include <boost/regex.hpp>
The algorithm regex _match determines whether a given regular expression
matches a given sequence denoted by a pair of bidirectional-iterators, the
algorithm is defined as follows, note that the result is true only if the
diff --git a/doc/regex_replace.html b/doc/regex_replace.html
index 1e13b553..8ff9764d 100644
--- a/doc/regex_replace.html
+++ b/doc/regex_replace.html
@@ -32,8 +32,8 @@
all the matches to the regular expression: for each match it then calls
match_results::format to format the string and sends the result to the
output iterator. Sections of text that do not match are copied to the output
- unchanged only if the flags parameter does not have the flag
- format_no_copy set. If the flag format_first_only
+ unchanged only if the flags parameter does not have the flag
+ format_no_copy set. If the flag format_first_only
is set then only the first occurrence is replaced rather than all
occurrences. The algorithm regex_search will search a range denoted by a pair of
bidirectional-iterators for a given regular expression. The algorithm uses
diff --git a/doc/sub_match.html b/doc/sub_match.html
index db995312..19b12c8d 100644
--- a/doc/sub_match.html
+++ b/doc/sub_match.html
@@ -24,14 +24,14 @@
#include <boost/regex.hpp>
+ #include <boost/regex.hpp>
Regular expressions are different from many simple pattern-matching algorithms
in that as well as finding an overall match they can also produce
sub-expression matches: each sub-expression being delimited in the pattern by a
pair of parenthesis (...). There has to be some method for reporting
sub-expression matches back to the user: this is achieved this by defining a
- class match_results that acts as an
+ class match_results that acts as an
indexed collection of sub-expression matches, each sub-expression match being
contained in an object of type sub_match
.
diff --git a/doc/syntax.html b/doc/syntax.html
index f776cd3c..3d39d9d2 100644
--- a/doc/syntax.html
+++ b/doc/syntax.html
@@ -90,10 +90,10 @@
Parentheses serve two purposes, to group items together into a sub-expression,
and to mark what generated the match. For example the expression "(ab)*" would
- match all of the string "ababab". The matching algorithms
- regex_match and regex_search
- each take an instance of match_results
- that reports what caused the match, on exit from these functions the
+ match all of the string "ababab". The matching algorithms
+ regex_match and regex_search
+ each take an instance of match_results
+ that reports what caused the match, on exit from these functions the
match_results contains information both on what the whole expression
matched and on what each sub-expression matched. In the example above
match_results[1] would contain a pair of iterators denoting the final "ab" of
diff --git a/example/Jamfile b/example/Jamfile
index 1392b2f8..f84c6ca8 100644
--- a/example/Jamfile
+++ b/example/Jamfile
@@ -1,3 +1,5 @@
+# copyright John Maddock 2003
+
subproject libs/regex/example ;
# bring in the rules for testing
@@ -42,6 +44,9 @@ test-suite regex-examples :
[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
[ regex-test-run snippets/regex_split_example_1.cpp : -auto ]
[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
+[ regex-test-run snippets/regex_token_iterator_eg_1.cpp : -auto ]
+[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
+[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
;
diff --git a/example/snippets/regex_grep_example_4.cpp b/example/snippets/regex_grep_example_4.cpp
index 105e9b93..98711851 100644
--- a/example/snippets/regex_grep_example_4.cpp
+++ b/example/snippets/regex_grep_example_4.cpp
@@ -147,9 +147,10 @@ int main(int argc, const char** argv)
int main()
{
return 0;
-};
+}
#endif
+
diff --git a/example/snippets/regex_token_iterator_example_1.cpp b/example/snippets/regex_token_iterator_eg_1.cpp
similarity index 100%
rename from example/snippets/regex_token_iterator_example_1.cpp
rename to example/snippets/regex_token_iterator_eg_1.cpp
diff --git a/example/snippets/regex_token_iterator_example_2.cpp b/example/snippets/regex_token_iterator_eg_2.cpp
similarity index 100%
rename from example/snippets/regex_token_iterator_example_2.cpp
rename to example/snippets/regex_token_iterator_eg_2.cpp
diff --git a/performance/Jamfile b/performance/Jamfile
index d3a58ee6..4e2bd93d 100644
--- a/performance/Jamfile
+++ b/performance/Jamfile
@@ -1,3 +1,4 @@
+# copyright John Maddock 2003
subproject libs/regex/performance ;
diff --git a/performance/command_line.cpp b/performance/command_line.cpp
index b74143c3..a8fdc680 100644
--- a/performance/command_line.cpp
+++ b/performance/command_line.cpp
@@ -1,3 +1,17 @@
+/*
+ *
+ * Copyright (c) 2002-2003
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
#include template <class OutputIterator, class BidirectionalIterator, class traits,
class Allocator, class charT>
diff --git a/doc/regex_search.html b/doc/regex_search.html
index a7fcd9b8..97850ba7 100644
--- a/doc/regex_search.html
+++ b/doc/regex_search.html
@@ -27,7 +27,7 @@
Synopsis
- #include <boost/regex.hpp>
+ #include <boost/regex.hpp>
Synopsis
-