diff --git a/appendix.htm b/appendix.htm index 9acac550..a525dbde 100644 --- a/appendix.htm +++ b/appendix.htm @@ -13,25 +13,25 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">

 

- +
- -

C++ Boost

+

C++ Boost

Regex++, - Appendices.

-

(version 3.12, 18 April 2000)

-
Copyright (c) 1998-2000
-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.
+

Regex++, Appendices.

+

(Version 3.20, 29th Sept 2001)  +

+

Copyright (c) 1998-2001

+

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.

diff --git a/example/jgrep/jgrep.cpp b/example/jgrep/jgrep.cpp index 04d064c8..080cf1bf 100644 --- a/example/jgrep/jgrep.cpp +++ b/example/jgrep/jgrep.cpp @@ -15,7 +15,7 @@ /* * FILE jgrep.cpp - * VERSION 3.12 + * VERSION see */ #include diff --git a/example/jgrep/jgrep.h b/example/jgrep/jgrep.h index 9eb8687d..2efc3b4e 100644 --- a/example/jgrep/jgrep.h +++ b/example/jgrep/jgrep.h @@ -15,7 +15,7 @@ /* * FILE jgrep.h - * VERSION 3.12 + * VERSION see */ #ifndef _JGREP_H diff --git a/example/jgrep/main.cpp b/example/jgrep/main.cpp index 05048584..6f241cf0 100644 --- a/example/jgrep/main.cpp +++ b/example/jgrep/main.cpp @@ -15,7 +15,7 @@ /* * FILE main.cpp - * VERSION 3.12 + * VERSION see */ diff --git a/example/snippets/credit_card_example.cpp b/example/snippets/credit_card_example.cpp index d01ab9be..ec2f5a12 100644 --- a/example/snippets/credit_card_example.cpp +++ b/example/snippets/credit_card_example.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE credit_card_example.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: Credit card number formatting code. */ diff --git a/example/snippets/regex_grep_example_1.cpp b/example/snippets/regex_grep_example_1.cpp index a385cd03..846a0ee8 100644 --- a/example/snippets/regex_grep_example_1.cpp +++ b/example/snippets/regex_grep_example_1.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_grep_example_1.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_grep example 1: searches a cpp file for class definitions. */ diff --git a/example/snippets/regex_grep_example_2.cpp b/example/snippets/regex_grep_example_2.cpp index c54e63a1..b7b01f92 100644 --- a/example/snippets/regex_grep_example_2.cpp +++ b/example/snippets/regex_grep_example_2.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_grep_example_2.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_grep example 2: searches a cpp file for class definitions, * using a global callback function. */ diff --git a/example/snippets/regex_grep_example_3.cpp b/example/snippets/regex_grep_example_3.cpp index cad3e2bd..e3ab8785 100644 --- a/example/snippets/regex_grep_example_3.cpp +++ b/example/snippets/regex_grep_example_3.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_grep_example_3.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_grep example 3: searches a cpp file for class definitions, * using a bound member function callback. */ diff --git a/example/snippets/regex_grep_example_4.cpp b/example/snippets/regex_grep_example_4.cpp index b5e9fcf5..fd7ea6fd 100644 --- a/example/snippets/regex_grep_example_4.cpp +++ b/example/snippets/regex_grep_example_4.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_grep_example_4.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_grep example 4: searches a cpp file for class definitions, * using a C++ Builder closure as a callback. */ diff --git a/example/snippets/regex_match_example.cpp b/example/snippets/regex_match_example.cpp index ba7541a5..0066efcf 100644 --- a/example/snippets/regex_match_example.cpp +++ b/example/snippets/regex_match_example.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_match_example.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: ftp based regex_match example. */ diff --git a/example/snippets/regex_merge_example.cpp b/example/snippets/regex_merge_example.cpp index 95f6d03b..505b8ce0 100644 --- a/example/snippets/regex_merge_example.cpp +++ b/example/snippets/regex_merge_example.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_merge_example.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_merge example: * converts a C++ file to syntax highlighted HTML. */ diff --git a/example/snippets/regex_search_example.cpp b/example/snippets/regex_search_example.cpp index aa0574e5..0f48fe23 100644 --- a/example/snippets/regex_search_example.cpp +++ b/example/snippets/regex_search_example.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_search_example.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_search example: searches a cpp file for class definitions. */ diff --git a/example/snippets/regex_split_example_1.cpp b/example/snippets/regex_split_example_1.cpp index 7d0d7a18..bb6c16f7 100644 --- a/example/snippets/regex_split_example_1.cpp +++ b/example/snippets/regex_split_example_1.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_split_example_1.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_split example: split a string into tokens. */ diff --git a/example/snippets/regex_split_example_2.cpp b/example/snippets/regex_split_example_2.cpp index 04fbd3c2..432e50a7 100644 --- a/example/snippets/regex_split_example_2.cpp +++ b/example/snippets/regex_split_example_2.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_split_example_2.cpp - * VERSION 3.00 + * VERSION see * DESCRIPTION: regex_split example: spit out linked URL's. */ diff --git a/faq.htm b/faq.htm index 4cc2eb0d..75140940 100644 --- a/faq.htm +++ b/faq.htm @@ -13,25 +13,25 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">

 

- +
- -

C++ Boost

+

C++ Boost

Regex++, - FAQ.

-

(version 3.12, 18 April 2000)

-
Copyright (c) 1998-2000
-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.
+

Regex++, FAQ.

+

(Version 3.20, 29th Sept 2001)  +

+

Copyright (c) 1998-2001

+

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.

diff --git a/format_string.htm b/format_string.htm index 0e1a8be5..4a0e6ed1 100644 --- a/format_string.htm +++ b/format_string.htm @@ -1,202 +1,245 @@ - - - - - - - - -Regex++, Format String Reference - + - -  - - - - -

-C++ Boost

-
-

Regex++, Format String Reference.

-
-
-(version 3.12, 18 April 2000) -
-
Copyright (c) 1998-2000
-Dr John Maddock
+
+
+
+
+Regex++, Format String Reference
+
 
-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.
+ -
-
-

Format String Syntax

-Format strings are used by the algorithms -regex_format and -regex_merge, and are used to -transform one string into another.

There are three kind of format string: -sed, perl and extended, the extended syntax is the default so this is covered -first.

-

Extended format syntax

-

In format strings, all characters are treated as literals except: ()$\?: -

-

To use any of these as literals you must prefix them with the escape -character \

-

The following special sequences are recognized:

-

Grouping:

-

Use the parenthesis characters ( and ) to group sub-expressions within the -format string, use \( and \) to represent literal '(' and ')'.

-

Sub-expression expansions:

-

The following perl like expressions expand to a particular matched -sub-expression:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 $`Expands to all the text from the end of the -previous match to the start of the current match, if there was no previous -match in the current operation, then everything from the start of the input -string to the start of the match. 
 $'Expands to all the text from the end of the match -to the end of the input string. 
 $&Expands to all of the current match. 
 $0Expands to all of the current match. 
 $NExpands to the text that matched sub-expression -N. 
-

Conditional expressions:

-

Conditional expressions allow two different format strings to be selected -dependent upon whether a sub-expression participated in the match or not:

-

?Ntrue_expression:false_expression

-

Executes true_expression if sub-expression N participated in the -match, otherwise executes false_expression.

-

Example: suppose we search for "(while)|(for)" then the format -string "?1WHILE:FOR" would output what matched, but in upper case. -

-

Escape sequences:

-

The following escape sequences are also allowed:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 \aThe bell character. 
 \fThe form feed character. 
 \nThe newline character. 
 \rThe carriage return character. 
 \tThe tab character. 
 \vA vertical tab character. 
 \xA hexadecimal character - for example \x0D. 
 \x{}A possible unicode hexadecimal character - for -example \x{1A0} 
 \cxThe ASCII escape character x, for example \c@ is -equivalent to escape-@. 
 \eThe ASCII escape character. 
 \ddAn octal character constant, for example \10. 
-

Perl format strings

-

Perl format strings are the same as the default syntax except that the -characters ()?: have no special meaning.

-

Sed format strings

-

Sed format strings use only the characters \ and & as special -characters.

-

\n where n is a digit, is expanded to the nth sub-expression.

-

& is expanded to the whole of the match (equivalent to \0).

-

Other escape sequences are expanded as per the default syntax.
-

-
-

Copyright Dr John -Maddock 1998-2000 all rights reserved.

- - +

 

+ + + + + +

C++ Boost

+

Regex++, Format + String Reference.

+

(Version 3.20, 29th Sept 2001)  +

+

Copyright (c) 1998-2001

+

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.

+
+ +
+ +

Format String Syntax

+ +

Format strings are used by the algorithms regex_format and regex_merge, and are +used to transform one string into another.

+ +

There are three kind of format string: sed, perl and extended, +the extended syntax is the default so this is covered first.

+ +

Extended format syntax

+ +

In format strings, all characters are treated as literals +except: ()$\?:

+ +

To use any of these as literals you must prefix them with the +escape character \

+ +

The following special sequences are recognized:

+ +

Grouping:

+ +

Use the parenthesis characters ( and ) to group sub-expressions +within the format string, use \( and \) to represent literal '(' +and ')'.

+ +

Sub-expression expansions:

+ +

The following perl like expressions expand to a particular +matched sub-expression:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 $`Expands to all the text from + the end of the previous match to the start of the current + match, if there was no previous match in the current + operation, then everything from the start of the input + string to the start of the match. 
 $'Expands to all the text from + the end of the match to the end of the input string. 
 $&Expands to all of the + current match. 
 $0Expands to all of the + current match. 
 $NExpands to the text that + matched sub-expression N. 
+ +


+ +

Conditional expressions:

+ +

Conditional expressions allow two different format strings to +be selected dependent upon whether a sub-expression participated +in the match or not:

+ +

?Ntrue_expression:false_expression

+ +

Executes true_expression if sub-expression N +participated in the match, otherwise executes false_expression.

+ +

Example: suppose we search for "(while)|(for)" then +the format string "?1WHILE:FOR" would output what +matched, but in upper case.

+ +

Escape sequences:

+ +

The following escape sequences are also allowed:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 \aThe bell character. 
 \fThe form feed character. 
 \nThe newline character. 
 \rThe carriage return + character. 
 \tThe tab character. 
 \vA vertical tab character. 
 \xA hexadecimal character - + for example \x0D. 
 \x{}A possible unicode + hexadecimal character - for example \x{1A0} 
 \cxThe ASCII escape character + x, for example \c@ is equivalent to escape-@. 
 \eThe ASCII escape character. 
 \ddAn octal character constant, + for example \10. 
+ +


+ +

Perl format strings

+ +

Perl format strings are the same as the default syntax except +that the characters ()?: have no special meaning.

+ +

Sed format strings

+ +

Sed format strings use only the characters \ and & as +special characters.

+ +

\n where n is a digit, is expanded to the nth sub-expression.

+ +

& is expanded to the whole of the match (equivalent to \0). +

+ +

Other escape sequences are expanded as per the default syntax. +
+

+ +
+ +

Copyright Dr +John Maddock 1998-2000 all rights reserved.

+ + diff --git a/hl_ref.htm b/hl_ref.htm index 7f1b1996..aa6df2c7 100644 --- a/hl_ref.htm +++ b/hl_ref.htm @@ -15,23 +15,24 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot"> - -

C++ Boost

+

C++ Boost

Regex++, - RegEx Class Reference.

-

(version 3.12, 18 April 2000)

-
Copyright (c) 1998-2000
-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.
+

Regex++, RegEx Class + Reference.

+

(Version 3.20, 29th Sept 2001)  +

+

Copyright (c) 1998-2001

+

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.

diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index 1876ffe2..a1461f5f 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE config.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: regex extended config setup. */ diff --git a/include/boost/regex/detail/fileiter.hpp b/include/boost/regex/detail/fileiter.hpp index f106d0a3..1bd7f870 100644 --- a/include/boost/regex/detail/fileiter.hpp +++ b/include/boost/regex/detail/fileiter.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE fileiter.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Declares various platform independent file and * directory iterators, plus binary file input in * the form of class map_file. diff --git a/include/boost/regex/detail/regex_compile.hpp b/include/boost/regex/detail/regex_compile.hpp index f1b531b5..79476e79 100644 --- a/include/boost/regex/detail/regex_compile.hpp +++ b/include/boost/regex/detail/regex_compile.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_compile.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Declares reg_expression<> member functions. This is * an internal header file, do not include directly. */ diff --git a/include/boost/regex/detail/regex_cstring.hpp b/include/boost/regex/detail/regex_cstring.hpp index 2e17734d..4d5b86a8 100644 --- a/include/boost/regex/detail/regex_cstring.hpp +++ b/include/boost/regex/detail/regex_cstring.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_cstring.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: This is an internal header file, do not include directly. * String support and helper functions, for regular * expression library. diff --git a/include/boost/regex/detail/regex_format.hpp b/include/boost/regex/detail/regex_format.hpp index 86d72e32..f1012d27 100644 --- a/include/boost/regex/detail/regex_format.hpp +++ b/include/boost/regex/detail/regex_format.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_format.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Provides formatting output routines for search and replace * operations. Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_kmp.hpp b/include/boost/regex/detail/regex_kmp.hpp index afdebcbe..093e26dd 100644 --- a/include/boost/regex/detail/regex_kmp.hpp +++ b/include/boost/regex/detail/regex_kmp.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_kmp.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Provides Knuth Morris Pratt search operations. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_library_include.hpp b/include/boost/regex/detail/regex_library_include.hpp index 6ff7607a..903f02be 100644 --- a/include/boost/regex/detail/regex_library_include.hpp +++ b/include/boost/regex/detail/regex_library_include.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_libary_include.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_match.hpp b/include/boost/regex/detail/regex_match.hpp index e7aeb10b..52278c48 100644 --- a/include/boost/regex/detail/regex_match.hpp +++ b/include/boost/regex/detail/regex_match.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_match.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Regular expression matching algorithms. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_raw_buffer.hpp b/include/boost/regex/detail/regex_raw_buffer.hpp index d97be92a..45000e43 100644 --- a/include/boost/regex/detail/regex_raw_buffer.hpp +++ b/include/boost/regex/detail/regex_raw_buffer.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_raw_buffer.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Raw character buffer for regex code. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_split.hpp b/include/boost/regex/detail/regex_split.hpp index cd5b906a..32e78bc4 100644 --- a/include/boost/regex/detail/regex_split.hpp +++ b/include/boost/regex/detail/regex_split.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_split.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Implements regex_split and associated functions. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_stack.hpp b/include/boost/regex/detail/regex_stack.hpp index 0bcb03dd..7986a697 100644 --- a/include/boost/regex/detail/regex_stack.hpp +++ b/include/boost/regex/detail/regex_stack.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_stack.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Implements customised internal regex stacks. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/detail/regex_synch.hpp b/include/boost/regex/detail/regex_synch.hpp index 349824e5..3be579fa 100644 --- a/include/boost/regex/detail/regex_synch.hpp +++ b/include/boost/regex/detail/regex_synch.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_synch.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Thread synchronisation for regex code. * Note this is an internal header file included * by regex.hpp, do not include on its own. diff --git a/include/boost/regex/pattern_except.hpp b/include/boost/regex/pattern_except.hpp index e07d127b..cf04e5a5 100644 --- a/include/boost/regex/pattern_except.hpp +++ b/include/boost/regex/pattern_except.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE pattern_except.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Declares pattern-matching exception classes. */ diff --git a/include/boost/regex/regex_traits.hpp b/include/boost/regex/regex_traits.hpp index 98992309..5602d5fe 100644 --- a/include/boost/regex/regex_traits.hpp +++ b/include/boost/regex/regex_traits.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_traits.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Declares regular expression traits classes. */ diff --git a/include/boost/regex/src.cpp b/include/boost/regex/src.cpp index 18a5f008..2bc992f7 100644 --- a/include/boost/regex/src.cpp +++ b/include/boost/regex/src.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE src.cpp - * VERSION 3.11 + * VERSION see * DESCRIPTION: Includes all the regex source files, include this * file only if you need to build the regex library * as a single file. Before including this file you diff --git a/include/boost/regex/user.hpp b/include/boost/regex/user.hpp index 3259fd15..97e8c1a6 100644 --- a/include/boost/regex/user.hpp +++ b/include/boost/regex/user.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE user.hpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: User settable options. */ diff --git a/index.htm b/index.htm index 231f589f..ca7cc5ff 100644 --- a/index.htm +++ b/index.htm @@ -17,23 +17,23 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot"> - -

C++ Boost

+

C++ Boost

Regex++, - Index.

-

(version 3.12, 18 April 2000)

-
Copyright (c) 1998-2000
-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.
+

Regex++, Index.

+

(Version 3.20, 29th Sept 2001)  +

+

Copyright (c) 1998-2001

+

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.

@@ -92,33 +92,42 @@ It is provided "as is" without express or implied warranty.
  • Localization
  • Example Applications diff --git a/introduction.htm b/introduction.htm index 5ace27b2..262201d5 100644 --- a/introduction.htm +++ b/introduction.htm @@ -15,25 +15,25 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">

     

    - +
    - -

    C++ Boost

    +

    C++ Boost

    Regex++, - Introduction.

    -

    (version 3.12, 18 April 2000)

    -
    Copyright (c) 1998-2000
    -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.
    +

    Regex++, Introduction.

    +

    (Version 3.20, 29th Sept 2001)  +

    +

    Copyright (c) 1998-2001

    +

    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.

    diff --git a/old_include/cregex.h b/old_include/cregex.h index 059c4455..9e975a19 100644 --- a/old_include/cregex.h +++ b/old_include/cregex.h @@ -15,7 +15,7 @@ /* * FILE cregex.h - * VERSION 2.21 + * VERSION see * deprecated regular expression matching algorithms */ diff --git a/old_include/regex.h b/old_include/regex.h index 0d824b27..e3e63b11 100644 --- a/old_include/regex.h +++ b/old_include/regex.h @@ -15,7 +15,7 @@ /* * FILE regex.h - * VERSION 2.21 + * VERSION see * deprecated regular expression matching algorithms */ diff --git a/posix_ref.htm b/posix_ref.htm index 7e5d4320..35262c5c 100644 --- a/posix_ref.htm +++ b/posix_ref.htm @@ -1,66 +1,74 @@ - - - - - - - - -Regex++, POSIX API Reference - + - -  - - - - -

    -C++ Boost

    -
    -

    Regex++, POSIX API Reference.

    -
    -
    -(version 3.12, 18 April 2000) -
    -
    Copyright (c) 1998-2000
    -Dr John Maddock
    +
    +
    +
    +
    +Regex++, POSIX API Reference
    +
     
    -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.
    + -
    -
    -

    POSIX compatibility library

    -
    #include <boost/cregex.hpp>
    -or:
    -#include <boost/regex.h>
    +

     

    -

    The following functions are available for users who need a POSIX compatible -C library, they are available in both Unicode and narrow character versions, -the standard POSIX API names are macros that expand to one version or the other -depending upon whether UNICODE is defined or not.

    -

    Important: Note that all the symbols defined here are enclosed inside -namespace boost when used in C++ programs, unless you use #include -<boost/regex.h> instead - in which case the symbols are still defined in -namespace boost, but are made available in the global namespace as well.

    -

    The functions are defined as:

    -
    extern "C" {
    -int regcompA(regex_tA*, const char*, int);
    -unsigned int regerrorA(int, const regex_tA*, char*, unsigned int);
    -int regexecA(const regex_tA*, const char*, unsigned int, regmatch_t*, int);
    -void regfreeA(regex_tA*);
    +
    +    
    +        
    +        
    +    
    +

    C++ Boost

    +

    Regex++, POSIX API + Reference.

    +

    (Version 3.20, 29th Sept 2001)  +

    +

    Copyright (c) 1998-2001

    +

    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.

    +
    -int regcompW(regex_tW*, const wchar_t*, int); -unsigned int regerrorW(int, const regex_tW*, wchar_t*, unsigned int); -int regexecW(const regex_tW*, const wchar_t*, unsigned int, regmatch_t*, int); -void regfreeW(regex_tW*); +
    + +

    POSIX compatibility library

    + +
    #include <boost/cregex.hpp>
    +or:
    +#include <boost/regex.h>
    + +

    The following functions are available for users who need a +POSIX compatible C library, they are available in both Unicode +and narrow character versions, the standard POSIX API names are +macros that expand to one version or the other depending upon +whether UNICODE is defined or not.

    + +

    Important: Note that all the symbols defined here are +enclosed inside namespace boost when used in C++ programs, +unless you use #include <boost/regex.h> instead - in which +case the symbols are still defined in namespace boost, but are +made available in the global namespace as well.

    + +

    The functions are defined as:

    + +
    extern "C" {
    +int regcompA(regex_tA*, const char*, int);
    +unsigned int regerrorA(int, const regex_tA*, char*, unsigned int);
    +int regexecA(const regex_tA*, const char*, unsigned int, regmatch_t*, int);
    +void regfreeA(regex_tA*);
    +
    +int regcompW(regex_tW*, const wchar_t*, int);
    +unsigned int regerrorW(int, const regex_tW*, wchar_t*, unsigned int);
    +int regexecW(const regex_tW*, const wchar_t*, unsigned int, regmatch_t*, int);
    +void regfreeW(regex_tW*);
     
     #ifdef UNICODE
     #define regcomp regcompW
    @@ -75,203 +83,234 @@ namespace boost, but are made available in the global namespace as well.

    #define regfree regfreeA #define regex_t regex_tA #endif -}
    -All the functions operate on structure regex_t, which exposes two public -members: -

    unsigned int re_nsub this is filled in by regcomp and -indicates the number of sub-expressions contained in the regular expression. -

    -

    const TCHAR* re_endp points to the end of the expression to compile -when the flag REG_PEND is set.

    -

    Footnote: regex_t is actually a #define - it is either regex_tA or -regex_tW depending upon whether UNICODE is defined or not, TCHAR is either char -or wchar_t again depending upon the macro UNICODE.

    -

    regcomp takes a pointer to a regex_t, a pointer to the -expression to compile and a flags parameter which can be a combination of:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     REG_EXTENDEDCompiles modern regular expressions. Equivalent to -regbase::char_classes | regbase::intervals | regbase::bk_refs. 
     REG_BASICCompiles basic (obsolete) regular expression -syntax. Equivalent to regbase::char_classes | regbase::intervals | -regbase::limited_ops | regbase::bk_braces | regbase::bk_parens | -regbase::bk_refs. 
     REG_NOSPECAll characters are ordinary, the expression is a -literal string. 
     REG_ICASECompiles for matching that ignores character -case. 
     REG_NOSUBHas no effect in this library. 
     REG_NEWLINEWhen this flag is set a dot does not match the -newline character. 
     REG_PENDWhen this flag is set the re_endp parameter of the -regex_t structure must point to the end of the regular expression to -compile. 
     REG_NOCOLLATEWhen this flag is set then locale dependent -collation for character ranges is turned off. 
     REG_ESCAPE_IN_LISTS
    -, , ,
    When this flag is set, then escape sequences are -permitted in bracket expressions (character sets). 
     REG_NEWLINE_ALT When this flag is set then the newline character -is equivalent to the alternation operator |. 
     REG_PERL  A shortcut for perl-like behavior: -REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS 
     REG_AWKA shortcut for awk-like behavior: REG_EXTENDED | -REG_ESCAPE_IN_LISTS 
     REG_GREPA shortcut for grep like behavior: REG_BASIC | -REG_NEWLINE_ALT 
     REG_EGREP A shortcut for egrep like behavior: -REG_EXTENDED | REG_NEWLINE_ALT 
    -

    regerror takes the following parameters, it maps an error code -to a human readable string:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
     int codeThe error code. 
     const regex_t* eThe regular expression (can be null). 
     char* bufThe buffer to fill in with the error message. 
     unsigned int buf_sizeThe length of buf. 
    -

    If the error code is OR'ed with REG_ITOA then the message that results is -the printable name of the code rather than a message, for example -"REG_BADPAT". If the code is REG_ATIO then e must not be null -and e->re_pend must point to the printable name of an error code, the -return value is then the value of the error code. For any other value of -code, the return value is the number of characters in the error message, -if the return value is greater than or equal to buf_size then -regerror will have to be called again with a larger buffer.

    -

    regexec finds the first occurrence of expression e within -string buf. If len is non-zero then *m is filled in with -what matched the regular expression, m[0] contains what matched the -whole string, m[1] the first sub-expression etc, see regmatch_t -in the header file declaration for more details. The eflags parameter -can be a combination of:

    - - - - - - - - - - - - - - - - - - - -
     REG_NOTBOLParameter buf does not represent the start -of a line. 
     REG_NOTEOLParameter buf does not terminate at the end -of a line. 
     REG_STARTENDThe string searched starts at buf + -pmatch[0].rm_so and ends at buf + pmatch[0].rm_eo. 
    -

    Finally regfree frees all the memory that was allocated by -regcomp.

    -

    Footnote: this is an abridged reference to the POSIX API functions, it is -provided for compatibility with other libraries, rather than an API to be used -in new code (unless you need access from a language other than C++). This -version of these functions should also happily coexist with other versions, as -the names used are macros that expand to the actual function names.
    -

    -
    -

    Copyright Dr John -Maddock 1998-2000 all rights reserved.

    - - +}
    +

    All the functions operate on structure regex_t, which +exposes two public members:

    + +

    unsigned int re_nsub this is filled in by regcomp +and indicates the number of sub-expressions contained in the +regular expression.

    + +

    const TCHAR* re_endp points to the end of the +expression to compile when the flag REG_PEND is set.

    + +

    Footnote: regex_t is actually a #define - it is either +regex_tA or regex_tW depending upon whether UNICODE is defined or +not, TCHAR is either char or wchar_t again depending upon the +macro UNICODE.

    + +

    regcomp takes a pointer to a regex_t, a pointer +to the expression to compile and a flags parameter which can be a +combination of:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     REG_EXTENDEDCompiles modern regular + expressions. Equivalent to regbase::char_classes | + regbase::intervals | regbase::bk_refs. 
     REG_BASICCompiles basic (obsolete) + regular expression syntax. Equivalent to regbase::char_classes + | regbase::intervals | regbase::limited_ops | regbase::bk_braces + | regbase::bk_parens | regbase::bk_refs. 
     REG_NOSPECAll characters are ordinary, + the expression is a literal string. 
     REG_ICASECompiles for matching that + ignores character case. 
     REG_NOSUBHas no effect in this + library. 
     REG_NEWLINEWhen this flag is set a dot + does not match the newline character. 
     REG_PENDWhen this flag is set the + re_endp parameter of the regex_t structure must point to + the end of the regular expression to compile. 
     REG_NOCOLLATEWhen this flag is set then + locale dependent collation for character ranges is turned + off. 
     REG_ESCAPE_IN_LISTS
    + , , ,
    When this flag is set, then + escape sequences are permitted in bracket expressions (character + sets). 
     REG_NEWLINE_ALT When this flag is set then + the newline character is equivalent to the alternation + operator |. 
     REG_PERL  A shortcut for perl-like + behavior: REG_EXTENDED | REG_NOCOLLATE | + REG_ESCAPE_IN_LISTS 
     REG_AWKA shortcut for awk-like + behavior: REG_EXTENDED | REG_ESCAPE_IN_LISTS 
     REG_GREPA shortcut for grep like + behavior: REG_BASIC | REG_NEWLINE_ALT 
     REG_EGREP A shortcut for egrep + like behavior: REG_EXTENDED | REG_NEWLINE_ALT 
    + +


    + +

    regerror takes the following parameters, it maps an +error code to a human readable string:

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
     int codeThe error code. 
     const regex_t* eThe regular expression (can + be null). 
     char* bufThe buffer to fill in with + the error message. 
     unsigned int buf_sizeThe length of buf. 
    + +

    If the error code is OR'ed with REG_ITOA then the message that +results is the printable name of the code rather than a message, +for example "REG_BADPAT". If the code is REG_ATIO then e +must not be null and e->re_pend must point to the +printable name of an error code, the return value is then the +value of the error code. For any other value of code, the +return value is the number of characters in the error message, if +the return value is greater than or equal to buf_size then +regerror will have to be called again with a larger buffer.

    + +

    regexec finds the first occurrence of expression e +within string buf. If len is non-zero then *m +is filled in with what matched the regular expression, m[0] +contains what matched the whole string, m[1] the first sub-expression +etc, see regmatch_t in the header file declaration for +more details. The eflags parameter can be a combination of: +

    + + + + + + + + + + + + + + + + + + + + +
     REG_NOTBOLParameter buf does + not represent the start of a line. 
     REG_NOTEOLParameter buf does + not terminate at the end of a line. 
     REG_STARTENDThe string searched starts + at buf + pmatch[0].rm_so and ends at buf + pmatch[0].rm_eo. 
    + +


    + +

    Finally regfree frees all the memory that was allocated +by regcomp.

    + +

    Footnote: this is an abridged reference to the POSIX API +functions, it is provided for compatibility with other libraries, +rather than an API to be used in new code (unless you need access +from a language other than C++). This version of these functions +should also happily coexist with other versions, as the names +used are macros that expand to the actual function names.
    +

    + +
    + +

    Copyright Dr +John Maddock 1998-2000 all rights reserved.

    + + diff --git a/src/c_regex_traits.cpp b/src/c_regex_traits.cpp index 2a4955ef..53eb4d04 100644 --- a/src/c_regex_traits.cpp +++ b/src/c_regex_traits.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE c_regex_traits.cpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Implements the c_regex_traits traits class */ diff --git a/src/c_regex_traits_common.cpp b/src/c_regex_traits_common.cpp index 63788dfd..a7947f17 100644 --- a/src/c_regex_traits_common.cpp +++ b/src/c_regex_traits_common.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: c_regex_traits_common.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements common code and data for the * c_regex_traits traits classes. */ diff --git a/src/cpp_regex_traits.cpp b/src/cpp_regex_traits.cpp index c0b1eba5..31a8c756 100644 --- a/src/cpp_regex_traits.cpp +++ b/src/cpp_regex_traits.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: c_regex_traits.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements the cpp_regex_traits traits class */ diff --git a/src/cregex.cpp b/src/cregex.cpp index 84d60d6d..39e5ba3e 100644 --- a/src/cregex.cpp +++ b/src/cregex.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: cregex.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements high level class boost::RexEx */ diff --git a/src/fileiter.cpp b/src/fileiter.cpp index 8529612f..5eca80a5 100644 --- a/src/fileiter.cpp +++ b/src/fileiter.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: fileiter.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements file io primitives + directory searching for class boost::RegEx. */ diff --git a/src/posix_api.cpp b/src/posix_api.cpp index 092bc7f5..fc467511 100644 --- a/src/posix_api.cpp +++ b/src/posix_api.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: posix_api.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements the Posix API wrappers. */ diff --git a/src/primary_transform.hpp b/src/primary_transform.hpp index e9447fb2..c6ee5ab6 100644 --- a/src/primary_transform.hpp +++ b/src/primary_transform.hpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: primary_transform.hpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Heuristically determines the sort string format in use * by the current locale. */ diff --git a/src/regex.cpp b/src/regex.cpp index ed98e439..d69bb415 100644 --- a/src/regex.cpp +++ b/src/regex.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: regex.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Misc boost::regbase member funnctions. */ diff --git a/src/regex_debug.cpp b/src/regex_debug.cpp index 806154d2..9286e1cc 100644 --- a/src/regex_debug.cpp +++ b/src/regex_debug.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: regex_debug.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Misc. debugging helpers. */ diff --git a/src/regex_synch.cpp b/src/regex_synch.cpp index be52d862..e88ab7b5 100644 --- a/src/regex_synch.cpp +++ b/src/regex_synch.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: regex_synch.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Thread synch helper functions, for regular * expression library. */ diff --git a/src/w32_regex_traits.cpp b/src/w32_regex_traits.cpp index 188944b8..90fe8ab8 100644 --- a/src/w32_regex_traits.cpp +++ b/src/w32_regex_traits.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: w32_regex_traits.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements the w32_regex_traits traits class */ diff --git a/src/wide_posix_api.cpp b/src/wide_posix_api.cpp index 62361fa4..ae453ecb 100644 --- a/src/wide_posix_api.cpp +++ b/src/wide_posix_api.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: wide_posix_api.cpp - * VERSION: 3.12 + * VERSION: see * DESCRIPTION: Implements the wide character POSIX API wrappers. */ diff --git a/syntax.htm b/syntax.htm index a3af73ea..e0fb61e3 100644 --- a/syntax.htm +++ b/syntax.htm @@ -15,23 +15,24 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot"> - -

    C++ Boost

    +

    C++ Boost

    Regex++, - Regular Expression Syntax.

    -

    (version 3.12, 18 April 2000)

    -
    Copyright (c) 1998-2000
    -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.
    +

    Regex++, Regular + Expression Syntax.

    +

    (Version 3.20, 29th Sept 2001)  +

    +

    Copyright (c) 1998-2001

    +

    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.

    diff --git a/template_class_ref.htm b/template_class_ref.htm index 7998f293..e2b2e924 100644 --- a/template_class_ref.htm +++ b/template_class_ref.htm @@ -13,25 +13,27 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">

     

    - +
    - -

    C++ Boost

    Regex++, - Template Class and Algorithm Reference.

    -

    (version 3.12, 18 April 2000)

    -
    Copyright (c) 1998-9
    -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.
    +

    Regex++ template + class reference.

    +

    (Version 3.20, 29th Sept 2001)  +

    +

    Copyright (c) 1998-2001

    +

    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.

    @@ -791,10 +793,10 @@ template <class charT> class regex_traits : public base_type { /*detailts*

    Where "base_type" defaults to w32_regex_traits on Win32 systems, and c_regex_traits otherwise. The default behaviour can be changed by defining one of -BOOST_REGEX_USE_C_LOCALE (forces use of c_regex_traits by default), -or BOOST_REGEX_USE_CPP_LOCALE (forces use of cpp_regex_traits by -default). Alternatively a specific traits class can be passed to -the reg_expression template.

    +BOOST_REGEX_USE_C_LOCALE (forces use of c_regex_traits by +default), or BOOST_REGEX_USE_CPP_LOCALE (forces use of cpp_regex_traits +by default). Alternatively a specific traits class can be passed +to the reg_expression template.

    The requirements for custom traits classes are documented separately here....

    diff --git a/test/c_compiler_checks/posix_api_check.c b/test/c_compiler_checks/posix_api_check.c index c6731ef7..1d999f92 100644 --- a/test/c_compiler_checks/posix_api_check.c +++ b/test/c_compiler_checks/posix_api_check.c @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE posix_api_compiler_check.c - * VERSION 3.01 + * VERSION see * DESCRIPTION: Verify that POSIX API calls compile: note this is a compile * time check only. */ diff --git a/test/c_compiler_checks/posix_api_check.cpp b/test/c_compiler_checks/posix_api_check.cpp index c6731ef7..1d999f92 100644 --- a/test/c_compiler_checks/posix_api_check.cpp +++ b/test/c_compiler_checks/posix_api_check.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE posix_api_compiler_check.c - * VERSION 3.01 + * VERSION see * DESCRIPTION: Verify that POSIX API calls compile: note this is a compile * time check only. */ diff --git a/test/c_compiler_checks/wide_posix_api_check.c b/test/c_compiler_checks/wide_posix_api_check.c index c706f16f..d8c3a152 100644 --- a/test/c_compiler_checks/wide_posix_api_check.c +++ b/test/c_compiler_checks/wide_posix_api_check.c @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE wide_posix_api_compiler_check.c - * VERSION 3.01 + * VERSION see * DESCRIPTION: Verify that POSIX API calls compile: note this is a compile * time check only. */ diff --git a/test/c_compiler_checks/wide_posix_api_check.cpp b/test/c_compiler_checks/wide_posix_api_check.cpp index c706f16f..d8c3a152 100644 --- a/test/c_compiler_checks/wide_posix_api_check.cpp +++ b/test/c_compiler_checks/wide_posix_api_check.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE wide_posix_api_compiler_check.c - * VERSION 3.01 + * VERSION see * DESCRIPTION: Verify that POSIX API calls compile: note this is a compile * time check only. */ diff --git a/test/regress/parse.cpp b/test/regress/parse.cpp index 1424f5c0..11c86ef3 100644 --- a/test/regress/parse.cpp +++ b/test/regress/parse.cpp @@ -16,7 +16,7 @@ /* * * FILE parse.cpp - * VERSION 3.12 + * VERSION see * * Input parsing functions for regress. * diff --git a/test/regress/regex_test.cpp b/test/regress/regex_test.cpp index f9c7c9a6..d2aa3251 100644 --- a/test/regress/regex_test.cpp +++ b/test/regress/regex_test.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_test.cpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Builds regression test program with default * locale and narrow character tests. Also * instantiates all the templates in the library diff --git a/test/regress/regress.cpp b/test/regress/regress.cpp index 82caba5d..913eafa6 100644 --- a/test/regress/regress.cpp +++ b/test/regress/regress.cpp @@ -16,7 +16,7 @@ /* * * FILE regress.cpp - * VERSION 3.12 + * VERSION see * * main() and associated code for regress. * diff --git a/test/regress/regress.h b/test/regress/regress.h index d72a9e10..0970a76d 100644 --- a/test/regress/regress.h +++ b/test/regress/regress.h @@ -16,7 +16,7 @@ /* * * FILE regress.h - * VERSION 3.12 + * VERSION see * * Function and data declarations for regress. * diff --git a/test/regress/tests.cpp b/test/regress/tests.cpp index 72cf8f70..bbcaf67d 100644 --- a/test/regress/tests.cpp +++ b/test/regress/tests.cpp @@ -16,7 +16,7 @@ /* * * FILE tests.cpp - * VERSION 3.12 + * VERSION see * * the actual tests conducted by regress. * diff --git a/test/regress/wregex_test.cpp b/test/regress/wregex_test.cpp index 2c1d531d..b4b800ca 100644 --- a/test/regress/wregex_test.cpp +++ b/test/regress/wregex_test.cpp @@ -16,7 +16,7 @@ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_test.cpp - * VERSION 3.12 + * VERSION see * DESCRIPTION: Builds regression test program with default * locale and wide character tests. Also * instantiates all the templates in the library diff --git a/traits_class_ref.htm b/traits_class_ref.htm index cb364dfc..b2772920 100644 --- a/traits_class_ref.htm +++ b/traits_class_ref.htm @@ -1,53 +1,61 @@ - - - - - - - - - - regex++ traits-class reference - + - - - - - - -

    C++ Boost

    -

    Regex++, Traits Class -Reference. (version 3.12, 18 April 2000) 

    -
    -Copyright (c) 1998-2000
    -Dr John Maddock
    +
    +
    +
    +
    +
    + regex++ traits-class reference 
    +
     
    -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.
    -
    + -
    -
    -

    This section describes the traits class requirements of the reg_expression -template class, these requirements are somewhat complex (sorry), and subject to -change as uses ask for new features, however I will try to keep them stable for -a while, and ideally the requirements should lessen rather than increase.

    -

    The reg_expression traits classes encapsulate both the properties of -a character type, and the properties of the locale associated with that type. -The associated locale may be defined at run-time (via std::locale), or -hard-coded into the traits class and determined at compile time.

    -

    The following example class illustrates the interface required by a -"typical" traits class for use with class reg_expression:

    -
    +
    +    
    +        
    +        
    +    
    +

    C++ Boost

    +

    Regex++, Traits Class + Reference.

    +

    (Version 3.20, 29th Sept 2001)  +

    +

    Copyright (c) 1998-2001

    +

    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.

    +
    + +
    + +

    This section describes the traits class requirements of the +reg_expression template class, these requirements are somewhat +complex (sorry), and subject to change as uses ask for new +features, however I will try to keep them stable for a while, and +ideally the requirements should lessen rather than increase.

    + +

    The reg_expression traits classes encapsulate both the +properties of a character type, and the properties of the locale +associated with that type. The associated locale may be defined +at run-time (via std::locale), or hard-coded into the traits +class and determined at compile time.

    + +

    The following example class illustrates the interface required +by a "typical" traits class for use with class +reg_expression:

    + +
     class mytraits
     {
        typedef implementation_defined char_type;
    @@ -161,711 +169,839 @@ class mytraits
        mytraits();
        ~mytraits();
     };
    -
    +
    -

    The member types required by a traits class are defined as follows:
    -  

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Member name Description  
      char_type The character type encapsulated -by this traits class, must be a POD type, and be convertible to uchar_type. - 
      uchar_type The unsigned type corresponding -to char_type, must be convertible to size_type.  
      size_type An unsigned integral type, with -at least as much precision as uchar_type.  
      string_type A type that offers the same -facilities as std::basic_string<char_type. This is used for collating -elements, and sort strings, if char_type has no locale dependent collation (it -is not a "character"), then it could be something simpler than -std::basic_string.  
      locale_type A type that encapsulates the -locale used by the traits class, probably std::locale but could be a platform -specific type, or a dummy type if per-instance locales are not supported by the -traits class.  
      uint32_t An unsigned integral type with -at least 32-bits of precision, used as a bitmask type for character -classification.  
      sentry A class or struct type which is -constructible from an instance of the traits class, and is convertible to -void*. An instance of type sentry will be constructed before compiling each -regular expression, it provides an opportunity to carry out prefix/suffix -operations on the traits class. 

    For example a traits class that -encapsulates the global locale, can use this as an opportunity to synchronize -with the global locale (by updating any cached data).

    -
     
    -


    - The following member constants are used to represent the locale -independent syntax of a regular expression; the member function -syntax_type returns one of these values, and is used to convert a locale -dependent regular expression, into a locale-independent sequence of tokens.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Member constant  English language -representation   
      syntax_char  All non-special -characters.   
      syntax_open_bracket   
      syntax_close_bracket   
      syntax_dollar   
      syntax_caret   
      syntax_dot   
      syntax_star   
      syntax_plus   
      syntax_question   
      syntax_open_set   
      syntax_close_set   
      syntax_or   
      syntax_slash   
      syntax_hash   
      syntax_dash   
      syntax_open_brace   
      syntax_close_brace   
      syntax_digit  0123456789   
      syntax_b   
      syntax_B   
      syntax_left_word   
      syntax_right_word     
      syntax_w   
      syntax_W   
      syntax_start_buffer   
      syntax_end_buffer   
      syntax_newline  \n   
      syntax_comma   
      syntax_a   
      syntax_f   
      syntax_n   
      syntax_r   
      syntax_t   
      syntax_v   
      syntax_x   
      syntax_c   
      syntax_colon   
      syntax_equal   
      syntax_e   
      syntax_l   
      syntax_L   
      syntax_u   
      syntax_U   
      syntax_s   
      syntax_S   
      syntax_d   
      syntax_D   
      syntax_E   
      syntax_Q   
      syntax_X   
      syntax_C   
      syntax_Z   
      syntax_G   
      syntax_bang   
      syntax_and   
    -

    -

    The following member constants are used to represent particular character -classifications:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Member constant  Description  
      char_class_none  No classification, must be zero. - 
      char_class_alpha  All alphabetic characters.  
      char_class_cntrl  All control characters.  
      char_class_digit  All decimal digits.  
      char_class_lower  All lower case characters.  
      char_class_punct  All punctuation characters. - 
      char_class_space  All white-space characters. - 
      char_class_upper  All upper case characters.  
      char_class_xdigit  All hexadecimal digit -characters.  
      char_class_blank  All blank characters (space + -tab).  
      char_class_unicode  All extended unicode characters -- those that can not be represented as a single narrow character.  
      char_class_alnum  All alpha-numeric characters. - 
      char_class_graph  All graphic characters.  
      char_class_print  All printable characters.  
      char_class_word  All word characters -(alphanumeric characters + the underscore).  
    -

    The following member functions are required by all regular expression traits -classes, those members that are declared here as const, could be -declared static instead if the class does not contain instance data:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Member function Description  
      static size_t length(const -char_type* p); Returns the length of the -null-terminated string p.  
      unsigned int -syntax_type(size_type c)const;  Converts an input -character into a locale independent token (one of the syntax_xxx member -constants). Called when parsing the regular expression into a -locale-independent parse tree. 

    Example: in English language regular -expressions we would use "[[:word:]]" to represent the character -class of all word characters, and "\w" as a shortcut for this. -Consequently syntax_type('w') returns syntax_w. In French language regular -expressions, we would use "[[:mot:]]" in place of -"[[:word:]]" and therefore "\m" in place of "\w", -therefore it is syntax_type('m') that returns syntax_w.

    -
     
      char_type translate(char_type c, -bool icase)const;  Translates an input -character into a unique identifier that represents the equivalence class that -that character belongs to. If icase is true, then the returned value is -insensitive to case. 

    [An equivalence class is the set of all -characters that must be treated as being equivalent to each other.]

    -
     
      void transform(string_type& -out, const string_type& in)const;  Transforms the string -in, into a locale-dependent sort key, and stores the result in -out.  
      void -transform_primary(string_type& out, const string_type& in)const;  Transforms the string -in, into a locale-dependent primary sort key, and stores the result in -out.  
      bool is_separator(char_type -c)const;  Returns true only if -c is a line separator.  
      bool is_combining(char_type -c)const;  Returns true only if -c is a unicode combining character.  
      bool is_class(char_type c, -uint32_t f)const;  Returns true only if -c is a member of one of the character classes represented by the bitmap -f.  
      int toi(char_type c)const;  Converts the character -c to a decimal integer. 

    [Precondition: -is_class(c,char_class_digit)==true]

    -
     
      int toi(const char_type*& -first, const char_type* last, int radix)const;  Converts the string -[first-last) into an integral value using base radix. Stops when it -finds the first non-digit character, and sets first to point to that -character. 

    [Precondition: is_class(*first,char_class_digit)==true] -

    -
     
      uint32_t lookup_classname(const -char_type* first, const char_type* last)const;  Returns the bitmap -representing the character class [first-last), or char_class_none if -[first-last) is not recognized as a character class name.  
      bool -lookup_collatename(string_type& buf, const char_type* first, const -char_type* last)const; If the sequence [first-last) is -the name of a known collating element, then stores the collating element in -buf, and returns true, otherwise returns false.  
      locale_type imbue(locale_type -l);  Imbues the class with the -locale l.  
      locale_type getloc()const;  Returns the traits-class -locale.  
      std::string -error_string(unsigned id)const;  Returns the -locale-dependent error-string associated with the error-number id. The -parameter id is one of the REG_XXX error codes described by the POSIX -standard, and defined in <boost/cregex.hpp.  
      mytraits();  Constructor.  
      ~ mytraits();  Destructor.  
    -

    -


    -

    -
    -

    Copyright Dr John -Maddock 1998-2000 all rights reserved.

    - - +

    The member types required by a traits class are defined as +follows:
    +  

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Member + name Description +  
      char_type The + character type encapsulated by this traits class, must be + a POD type, and be convertible to uchar_type.  
      uchar_type + The + unsigned type corresponding to char_type, must be + convertible to size_type.  
      size_type An + unsigned integral type, with at least as much precision + as uchar_type.  
      string_type + A type + that offers the same facilities as std::basic_string<char_type. + This is used for collating elements, and sort strings, if + char_type has no locale dependent collation (it is not a + "character"), then it could be something + simpler than std::basic_string.  
      locale_type + A type + that encapsulates the locale used by the traits class, + probably std::locale but could be a platform specific + type, or a dummy type if per-instance locales are not + supported by the traits class.  
      uint32_t An + unsigned integral type with at least 32-bits of + precision, used as a bitmask type for character + classification.  
      sentry A class or + struct type which is constructible from an instance of + the traits class, and is convertible to void*. An + instance of type sentry will be constructed before + compiling each regular expression, it provides an + opportunity to carry out prefix/suffix operations on the + traits class. 

    For example a traits class that + encapsulates the global locale, can use this as an + opportunity to synchronize with the global locale (by + updating any cached data).

    +
     
    + +


    + The following member constants are used to represent the +locale independent syntax of a regular expression; the member +function syntax_type returns one of these values, and is +used to convert a locale dependent regular expression, into a +locale-independent sequence of tokens.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Member + constant  English + language representation   
      syntax_char  + All non-special + characters.   
      syntax_open_bracket  +  
      syntax_close_bracket  +  
      syntax_dollar  +  
      syntax_caret  +  
      syntax_dot  +  
      syntax_star  +  
      syntax_plus  +  
      syntax_question  +  
      syntax_open_set  +  
      syntax_close_set  +  
      syntax_or  +  
      syntax_slash  +  
      syntax_hash  +  
      syntax_dash  +  
      syntax_open_brace  +  
      syntax_close_brace  +  
      syntax_digit  + 0123456789  +  
      syntax_b  +  
      syntax_B  +  
      syntax_left_word  + <  +  
      syntax_right_word  +    
      syntax_w  +  
      syntax_W  +  
      syntax_start_buffer  +  
      syntax_end_buffer  +  
      syntax_newline  + \n   
      syntax_comma  +  
      syntax_a  +  
      syntax_f  +  
      syntax_n  +  
      syntax_r  +  
      syntax_t  +  
      syntax_v  +  
      syntax_x  +  
      syntax_c  +  
      syntax_colon  +  
      syntax_equal  +  
      syntax_e  +  
      syntax_l  +  
      syntax_L  +  
      syntax_u  +  
      syntax_U  +  
      syntax_s  +  
      syntax_S  +  
      syntax_d  +  
      syntax_D  +  
      syntax_E  +  
      syntax_Q  +  
      syntax_X  +  
      syntax_C  +  
      syntax_Z  +  
      syntax_G  +  
      syntax_bang  +  
      syntax_and  + &  +  
    + +

    The following member constants are used to represent +particular character classifications:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Member + constant  Description +  
      char_class_none  + No + classification, must be zero.  
      char_class_alpha  + All + alphabetic characters.  
      char_class_cntrl  + All + control characters.  
      char_class_digit  + All + decimal digits.  
      char_class_lower  + All lower + case characters.  
      char_class_punct  + All + punctuation characters.  
      char_class_space  + All white-space + characters.  
      char_class_upper  + All upper + case characters.  
      char_class_xdigit  + All + hexadecimal digit characters.  
      char_class_blank  + All blank + characters (space + tab).  
      char_class_unicode  + All + extended unicode characters - those that can not be + represented as a single narrow character.  
      char_class_alnum  + All alpha-numeric + characters.  
      char_class_graph  + All + graphic characters.  
      char_class_print  + All + printable characters.  
      char_class_word  + All word + characters (alphanumeric characters + the underscore).  
    + +

    The following member functions are required by all regular +expression traits classes, those members that are declared here +as const, could be declared static instead if the +class does not contain instance data:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Member + function Description +  
      static + size_t length(const char_type* p); Returns + the length of the null-terminated string p.  
      unsigned + int syntax_type(size_type c)const;  Converts + an input character into a locale independent token (one + of the syntax_xxx member constants). Called when parsing + the regular expression into a locale-independent parse + tree. 

    Example: in English language regular + expressions we would use "[[:word:]]" to + represent the character class of all word characters, and + "\w" as a shortcut for this. Consequently + syntax_type('w') returns syntax_w. In French language + regular expressions, we would use "[[:mot:]]" + in place of "[[:word:]]" and therefore "\m" + in place of "\w", therefore it is syntax_type('m') + that returns syntax_w.

    +
     
      char_type + translate(char_type c, bool icase)const;  Translates + an input character into a unique identifier that + represents the equivalence class that that character + belongs to. If icase is true, then the returned value is + insensitive to case. 

    [An equivalence class is + the set of all characters that must be treated as being + equivalent to each other.]

    +
     
      void + transform(string_type& out, const string_type& in)const; +  Transforms + the string in, into a locale-dependent sort key, + and stores the result in out.  
      void + transform_primary(string_type& out, const + string_type& in)const;  Transforms + the string in, into a locale-dependent primary + sort key, and stores the result in out.  
      bool + is_separator(char_type c)const;  Returns + true only if c is a line separator.  
      bool + is_combining(char_type c)const;  Returns + true only if c is a unicode combining character.  
      bool + is_class(char_type c, uint32_t f)const;  Returns + true only if c is a member of one of the character + classes represented by the bitmap f.  
      int toi(char_type + c)const;  Converts + the character c to a decimal integer. 

    [Precondition: + is_class(c,char_class_digit)==true]

    +
     
      int toi(const + char_type*& first, const char_type* last, int radix)const; +  Converts + the string [first-last) into an integral value using base + radix. Stops when it finds the first non-digit + character, and sets first to point to that + character. 

    [Precondition: is_class(*first,char_class_digit)==true] +

    +
     
      uint32_t + lookup_classname(const char_type* first, const char_type* + last)const;  Returns + the bitmap representing the character class [first-last), + or char_class_none if [first-last) is not recognized as a + character class name.  
      bool + lookup_collatename(string_type& buf, const char_type* + first, const char_type* last)const; If the + sequence [first-last) is the name of a known collating + element, then stores the collating element in buf, and + returns true, otherwise returns false.  
      locale_type + imbue(locale_type l);  Imbues + the class with the locale l.  
      locale_type + getloc()const;  Returns + the traits-class locale.  
      std::string + error_string(unsigned id)const;  Returns + the locale-dependent error-string associated with the + error-number id. The parameter id is one of + the REG_XXX error codes described by the POSIX standard, + and defined in <boost/cregex.hpp.  
      mytraits(); +  Constructor. +  
      ~ mytraits(); +  Destructor. +  
    + +


    +

    + +
    + +

    Copyright Dr +John Maddock 1998-2000 all rights reserved.

    + +