mirror of
https://github.com/boostorg/regex.git
synced 2025-06-25 20:01:37 +02:00
Compare commits
69 Commits
svn-branch
...
boost-1.36
Author | SHA1 | Date | |
---|---|---|---|
64f46149f3 | |||
756a875620 | |||
b7d906dff5 | |||
a08e8b5c85 | |||
9546df1f23 | |||
b39edff796 | |||
788c8a8470 | |||
c527b20062 | |||
a65bccab1c | |||
8fffb1250e | |||
069e845239 | |||
79d7e84f26 | |||
45891854d9 | |||
a159bacf3f | |||
97daf0f81f | |||
dc01b7833e | |||
ff95eb8d98 | |||
c48d7bb478 | |||
3cd2b52030 | |||
f5af9ba18d | |||
3e68fcb703 | |||
1fe19b815a | |||
d44bf8c41d | |||
5b9e134fc4 | |||
2643fcb245 | |||
7ac90de75a | |||
2ebe6d4ec7 | |||
b93dc9c301 | |||
1b0ab17df9 | |||
07016623eb | |||
4c56f3c14e | |||
95e3612e72 | |||
fdf8aa83ec | |||
c1722ff3de | |||
77e43136d1 | |||
f5449c38a6 | |||
5654efcf98 | |||
8d5985ce42 | |||
bb8f057d6c | |||
9002d01f75 | |||
b057d0f943 | |||
67128fa65f | |||
9fc486658f | |||
f4d849ec8f | |||
db4120e46d | |||
c4d064add8 | |||
65347f0f7f | |||
d3b885e20b | |||
60b6dbf275 | |||
443a498845 | |||
7a3a6dc7c6 | |||
37b39f6635 | |||
b473011375 | |||
0a998e8bc8 | |||
eb93be73eb | |||
eb791cd1c3 | |||
5928770c46 | |||
2d6fea3308 | |||
b58521163b | |||
921b0d758e | |||
dae6cbfead | |||
17a038b672 | |||
ccc52a8a63 | |||
01cc2aaa50 | |||
4370fe4607 | |||
171749f440 | |||
c1c2058d3d | |||
1a732d8c6a | |||
f0ae398ada |
@ -34,7 +34,7 @@ boostbook standalone
|
||||
|
||||
# PDF Options:
|
||||
# TOC Generation: this is needed for FOP-0.9 and later:
|
||||
#<xsl:param>fop1.extensions=1
|
||||
<xsl:param>fop1.extensions=0
|
||||
# Or enable this if you're using XEP:
|
||||
<xsl:param>xep.extensions=1
|
||||
# TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
|
||||
@ -55,3 +55,4 @@ boostbook standalone
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
@ -67,10 +67,9 @@ an object of type `X::locale_type`.
|
||||
[[v.lookup_classname(F1, F2)][X::char_class_type][Converts the character sequence designated by the iterator range \[F1,F2) into a bitmask type that can subsequently be passed to isctype. Values returned from lookup_classname can be safely bitwise or'ed together. Returns 0 if the character sequence is not the name of a character class recognized by X. The value returned shall be independent of the case of the characters in the sequence.]]
|
||||
[[v.lookup_collatename(F1, F2)][X::string_type][Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range \[F1, F2). Returns an empty string if the character sequence is not a valid collating element.]]
|
||||
[[v.isctype(c, v.lookup_classname (F1, F2))][bool][Returns true if character c is a member of the character class designated by the iterator range \[F1, F2), false otherwise.]]
|
||||
[[v.value(c, i)][int][Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. \[Note: the value of I will only be 8, 10, or 16. -end note\]]]
|
||||
[[v.value(c, I)][int][Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. \[Note: the value of I will only be 8, 10, or 16. -end note\]]]
|
||||
[[u.imbue(loc)][X::locale_type][Imbues u with the locale loc, returns the previous locale used by u if any. ]]
|
||||
[[v.getloc()][X::locale_type][Returns the current locale used by v if any. ]]
|
||||
[[v.error_string(i)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value i is not recognized then returns the string "Unknown error" or a localized equivalent.]]
|
||||
]
|
||||
|
||||
[h4 Additional Optional Requirements]
|
||||
@ -89,14 +88,14 @@ configure itself appropriately.
|
||||
[[v.escape_syntax_type(c)][regex_constants::escape_syntax_type][Returns a symbolic value of type regex_constants::escape_syntax_type, that signifies the meaning of character c within the regular expression grammar, when c has been preceded by an escape character. Precondition: if b is the character preceding c in the expression being parsed then: `v.syntax_type(b) == syntax_escape`]]
|
||||
[[v.translate(c, b)][X::char_type][Returns a character d such that: for any character d that is to be considered equivalent to c then `v.translate(c,false)==v.translate(d,false)`. Likewise for all characters C that are to be considered equivalent to c when comparisons are to be performed without regard to case, then `v.translate(c,true)==v.translate(C,true)`.]]
|
||||
[[v.toi(I1, I2, i)][An integer type capable of holding either a charT or an int.][Behaves as follows: if `p == q` or if `*p` is not a digit character then returns -1. Otherwise performs formatted numeric input on the sequence \[p,q) and returns the result as an int. Postcondition: either p == q or *p is a non-digit character.]]
|
||||
[[v.error_string(i)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value i is not recognized then returns the string "Unknown error" or a localized equivalent.]]
|
||||
[[v.error_string(I)][std::string][Returns a human readable error string for the error condition i, where i is one of the values enumerated by type regex_constants::error_type. If the value /I/ is not recognized then returns the string "Unknown error" or a localized equivalent.]]
|
||||
[[v.tolower(c)][X::char_type][Converts c to lower case, used for Perl-style \l and \L formating operations.]]
|
||||
[[v.toupper(c)][X::char_type][Converts c to upper case, used for Perl-style \u and \U formating operations.]]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:iterator_concepts Iterator Rrequirements]
|
||||
[section:iterator_concepts Iterator Requirements]
|
||||
|
||||
The regular expression algorithms (and iterators) take all require a
|
||||
Bidirectional-Iterator.
|
||||
|
@ -18,41 +18,54 @@ library will behave as claimed - at least as far as those items tested
|
||||
are concerned - if anyone spots anything that isn't being tested I'd be
|
||||
glad to hear about it.
|
||||
|
||||
Directory: [@../../test/regress libs/regex/test/regress].
|
||||
Files:
|
||||
|
||||
Files: See directory.
|
||||
* [@../../test/regress/main.cpp main.cpp]
|
||||
* [@../../test/regress/basic_tests.cpp basic_tests.cpp]
|
||||
* [@../../test/regress/test_alt.cpp test_alt.cpp]
|
||||
* [@../../test/regress/test_anchors.cpp test_anchors.cpp]
|
||||
* [@../../test/regress/test_asserts.cpp test_asserts.cpp]
|
||||
* [@../../test/regress/test_backrefs.cpp test_backrefs.cpp]
|
||||
* [@../../test/regress/test_deprecated.cpp test_deprecated.cpp]
|
||||
* [@../../test/regress/test_emacs.cpp test_emacs.cpp]
|
||||
* [@../../test/regress/test_escapes.cpp test_escapes.cpp]
|
||||
* [@../../test/regress/test_grep.cpp test_grep.cpp]
|
||||
* [@../../test/regress/test_icu.cpp test_icu.cpp]
|
||||
* [@../../test/regress/test_locale.cpp test_locale.cpp]
|
||||
* [@../../test/regress/test_mfc.cpp test_mfc.cpp]
|
||||
* [@../../test/regress/test_non_greedy_repeats.cpp test_non_greedy_repeats.cpp]
|
||||
* [@../../test/regress/test_operators.cpp test_operators.cpp]
|
||||
* [@../../test/regress/test_overloads.cpp test_overloads.cpp]
|
||||
* [@../../test/regress/test_perl_ex.cpp test_perl_ex.cpp]
|
||||
* [@../../test/regress/test_replace.cpp test_replace.cpp]
|
||||
* [@../../test/regress/test_sets.cpp test_sets.cpp]
|
||||
* [@../../test/regress/test_simple_repeats.cpp test_simple_repeats.cpp]
|
||||
* [@../../test/regress/test_tricky_cases.cpp test_tricky_cases.cpp]
|
||||
* [@../../test/regress/test_unicode.cpp test_unicode.cpp]
|
||||
|
||||
[*bad_expression_test:]
|
||||
|
||||
Verifies that "bad" regular expressions don't cause the matcher to go into
|
||||
infinite loops, but to throw an exception instead.
|
||||
|
||||
Directory: [@../../test/pathology libs/regex/test/pathology].
|
||||
|
||||
Files: [@../../test/pathology/bad_expression_test.cpp bad_expression_test.cpp].
|
||||
|
||||
[*recursion_test:]
|
||||
|
||||
Verifies that the matcher can't overrun the stack (no matter what the expression).
|
||||
|
||||
Directory: [@../../test/pathology libs/regex/test/pathology].
|
||||
|
||||
Files: [@../../test/pathology/recursion_test.cpp recursion_test.cpp].
|
||||
|
||||
[*concepts:]
|
||||
|
||||
Verifies that the library meets all documented concepts (a compile only test).
|
||||
|
||||
Directory: [@../../test/concepts libs/regex/test/concepts].
|
||||
|
||||
Files: [@../../test/concepts/concept_check.cpp concept_check.cpp].
|
||||
|
||||
[*captures_test:]
|
||||
|
||||
Test code for captures.
|
||||
|
||||
Directory: [@../../test/captures libs/test/captures].
|
||||
|
||||
Files: [@../../test/captures/captures_test.cpp captures_test.cpp].
|
||||
|
||||
[h4 Example programs]
|
||||
|
543
doc/gcc-performance.html
Normal file
543
doc/gcc-performance.html
Normal file
@ -0,0 +1,543 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Regular Expression Performance Comparison (gcc 3.2)</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<META content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot" name="Template">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
</head>
|
||||
<body bgcolor="#ffffff" link="#0000ff" vlink="#800080">
|
||||
<h2>Regular Expression Performance Comparison</h2>
|
||||
<p>The following tables provide comparisons between the following regular
|
||||
expression libraries:</p>
|
||||
<p><a href="http://www.boost.org/">The Boost regex library</a>.</p>
|
||||
<p><a href="http://www.gnu.org">The GNU regular expression library</a>.</p>
|
||||
<p>Philip Hazel's <a href="http://www.pcre.org">PCRE</a> library.</p>
|
||||
<h3>Details</h3>
|
||||
<p>Machine: Intel Pentium 4 2.8GHz PC.</p>
|
||||
<p>Compiler: GNU C++ version 3.2 20020927 (prerelease).</p>
|
||||
<p>C++ Standard Library: GNU libstdc++ version 20020927.</p>
|
||||
<p>OS: Cygwin.</p>
|
||||
<p>Boost version: 1.31.0.</p>
|
||||
<p>PCRE version: 4.1.</p>
|
||||
<p>As ever care should be taken in interpreting the results, only sensible regular
|
||||
expressions (rather than pathological cases) are given, most are taken from the
|
||||
Boost regex examples, or from the <a href="http://www.regxlib.com/">Library of
|
||||
Regular Expressions</a>. In addition, some variation in the relative
|
||||
performance of these libraries can be expected on other machines - as memory
|
||||
access and processor caching effects can be quite large for most finite state
|
||||
machine algorithms. In each case the first figure given is the relative time
|
||||
taken (so a value of 1.0 is as good as it gets), while the second figure is the
|
||||
actual time taken.</p>
|
||||
<h3>Averages</h3>
|
||||
<p>The following are the average relative scores for all the tests: the perfect
|
||||
regular expression library would score 1, in practice anything less than 2
|
||||
is pretty good.</p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.4503</td>
|
||||
<td>1.49124</td>
|
||||
<td>108.372</td>
|
||||
<td>1.56255</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td>3.49<br>
|
||||
(0.205s)</td>
|
||||
<td>4.09<br>
|
||||
(0.24s)</td>
|
||||
<td>65.2<br>
|
||||
(3.83s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0588s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td>3.86<br>
|
||||
(0.203s)</td>
|
||||
<td>4.52<br>
|
||||
(0.238s)</td>
|
||||
<td>100<br>
|
||||
(5.26s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0526s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td><font color="#008000">1.01<br>
|
||||
(1.23s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.22s)</font></td>
|
||||
<td>4.95<br>
|
||||
(6.04s)</td>
|
||||
<td>4.67<br>
|
||||
(5.71s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.31s)</font></td>
|
||||
<td><font color="#008000">1.05<br>
|
||||
(0.326s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>3.32<br>
|
||||
(1.03s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.125s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.123s)</font></td>
|
||||
<td>165<br>
|
||||
(20.3s)</td>
|
||||
<td><font color="#008000">1.08<br>
|
||||
(0.133s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.345s)</font></td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.355s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.71<br>
|
||||
(0.59s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 2: Medium Sized Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a medium sized English language text was
|
||||
measured (the first 50K from mtent12.txt). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td>1.8<br>
|
||||
(0.000519s)</td>
|
||||
<td>2.14<br>
|
||||
(0.000616s)</td>
|
||||
<td>9.08<br>
|
||||
(0.00262s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000289s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td>3.65<br>
|
||||
(0.000499s)</td>
|
||||
<td>4.36<br>
|
||||
(0.000597s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000137s)</font></td>
|
||||
<td>1.43<br>
|
||||
(0.000196s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00258s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00258s)</font></td>
|
||||
<td>5.28<br>
|
||||
(0.0136s)</td>
|
||||
<td>5.63<br>
|
||||
(0.0145s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000929s)</font></td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.000957s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.82<br>
|
||||
(0.00262s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000812s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000812s)</font></td>
|
||||
<td>60.1<br>
|
||||
(0.0488s)</td>
|
||||
<td>1.28<br>
|
||||
(0.00104s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.00178s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00174s)</font></td>
|
||||
<td>242<br>
|
||||
(0.421s)</td>
|
||||
<td>1.3<br>
|
||||
(0.00227s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 3: C++ Code Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the C++ source file <a href="../../../boost/crc.hpp">
|
||||
boost/crc.hpp</a> was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([
|
||||
]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?(\{|:[^;\{()]*\{)</code></td>
|
||||
<td><font color="#008000">1.04<br>
|
||||
(0.000144s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000139s)</font></td>
|
||||
<td>862<br>
|
||||
(0.12s)</td>
|
||||
<td>4.56<br>
|
||||
(0.000636s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>(^[
|
||||
]*#(?:[^\\\n]|\\[^\n_[:punct:][:alnum:]]*[\n[:punct:][:word:]])*)|(//[^\n]*|/\*.*?\*/)|\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\>|('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*")|\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\></code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0139s)</font></td>
|
||||
<td><font color="#008000">1.01<br>
|
||||
(0.0141s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.55<br>
|
||||
(0.0216s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("[^"]+"|<[^>]+>)</code></td>
|
||||
<td><font color="#008000">1.04<br>
|
||||
(0.000332s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000318s)</font></td>
|
||||
<td>130<br>
|
||||
(0.0413s)</td>
|
||||
<td>1.72<br>
|
||||
(0.000547s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("boost/[^"]+"|<boost/[^>]+>)</code></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.000323s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000318s)</font></td>
|
||||
<td>150<br>
|
||||
(0.0476s)</td>
|
||||
<td>1.72<br>
|
||||
(0.000547s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<h3></h3>
|
||||
<H3>Comparison 4: HTML Document Search
|
||||
</H3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the html file <a href="../../libraries.htm">libs/libraries.htm</a>
|
||||
was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>beman|john|dave</code></td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.000367s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000357s)</font></td>
|
||||
<td>47.4<br>
|
||||
(0.0169s)</td>
|
||||
<td>1.16<br>
|
||||
(0.000416s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><p>.*?</p></code></td>
|
||||
<td>1.25<br>
|
||||
(0.000459s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000367s)</font></td>
|
||||
<td>NA</td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.000376s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <a[^>]+href=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000509s)</font></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.000518s)</font></td>
|
||||
<td>305<br>
|
||||
(0.155s)</td>
|
||||
<td><font color="#008000">1.1<br>
|
||||
(0.000558s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <h[12345678][^>]*>.*?</h[12345678]></code></td>
|
||||
<td><font color="#008000">1.04<br>
|
||||
(0.00025s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00024s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.16<br>
|
||||
(0.000279s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <img[^>]+src=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td>2.22<br>
|
||||
(0.000489s)</td>
|
||||
<td>1.69<br>
|
||||
(0.000372s)</td>
|
||||
<td>148<br>
|
||||
(0.0326s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00022s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <font[^>]+face=("[^"]*"|[^[:space:]]+)[^>]*>.*?</font></code></td>
|
||||
<td>1.71<br>
|
||||
(0.000371s)</td>
|
||||
<td>1.75<br>
|
||||
(0.000381s)</td>
|
||||
<td>NA</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000218s)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 3: Simple Matches</h3>
|
||||
<p>For each of the following regular expressions the time taken to match against
|
||||
the text indicated was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Text</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>abc</code></td>
|
||||
<td>abc</td>
|
||||
<td>1.36<br>
|
||||
(2.15e-07s)</td>
|
||||
<td>1.36<br>
|
||||
(2.15e-07s)</td>
|
||||
<td>2.76<br>
|
||||
(4.34e-07s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.58e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([0-9]+)(\-| |$)(.*)$</code></td>
|
||||
<td>100- this is a line of ftp response which contains a message string</td>
|
||||
<td>1.55<br>
|
||||
(7.26e-07s)</td>
|
||||
<td>1.51<br>
|
||||
(7.07e-07s)</td>
|
||||
<td>319<br>
|
||||
(0.000149s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(4.67e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}</code></td>
|
||||
<td>1234-5678-1234-456</td>
|
||||
<td>1.96<br>
|
||||
(9.54e-07s)</td>
|
||||
<td>1.96<br>
|
||||
(9.54e-07s)</td>
|
||||
<td>44.5<br>
|
||||
(2.17e-05s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(4.87e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>john@johnmaddock.co.uk</td>
|
||||
<td>1.22<br>
|
||||
(1.51e-06s)</td>
|
||||
<td>1.23<br>
|
||||
(1.53e-06s)</td>
|
||||
<td>162<br>
|
||||
(0.000201s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.24e-06s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>foo12@foo.edu</td>
|
||||
<td>1.28<br>
|
||||
(1.47e-06s)</td>
|
||||
<td>1.3<br>
|
||||
(1.49e-06s)</td>
|
||||
<td>104<br>
|
||||
(0.00012s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.15e-06s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>bob.smith@foo.tv</td>
|
||||
<td>1.28<br>
|
||||
(1.47e-06s)</td>
|
||||
<td>1.3<br>
|
||||
(1.49e-06s)</td>
|
||||
<td>113<br>
|
||||
(0.00013s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.15e-06s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>EH10 2QQ</td>
|
||||
<td>1.38<br>
|
||||
(4.68e-07s)</td>
|
||||
<td>1.41<br>
|
||||
(4.77e-07s)</td>
|
||||
<td>13.5<br>
|
||||
(4.59e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.39e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>G1 1AA</td>
|
||||
<td>1.28<br>
|
||||
(4.35e-07s)</td>
|
||||
<td>1.25<br>
|
||||
(4.25e-07s)</td>
|
||||
<td>11.7<br>
|
||||
(3.97e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.39e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>SW1 1ZZ</td>
|
||||
<td>1.32<br>
|
||||
(4.53e-07s)</td>
|
||||
<td>1.31<br>
|
||||
(4.49e-07s)</td>
|
||||
<td>12.2<br>
|
||||
(4.2e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.44e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>4/1/2001</td>
|
||||
<td>1.16<br>
|
||||
(3.82e-07s)</td>
|
||||
<td>1.2<br>
|
||||
(3.96e-07s)</td>
|
||||
<td>13.9<br>
|
||||
(4.59e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.29e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>12/12/2001</td>
|
||||
<td>1.38<br>
|
||||
(4.49e-07s)</td>
|
||||
<td>1.38<br>
|
||||
(4.49e-07s)</td>
|
||||
<td>16<br>
|
||||
(5.2e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.25e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>123</td>
|
||||
<td>1.19<br>
|
||||
(7.64e-07s)</td>
|
||||
<td>1.16<br>
|
||||
(7.45e-07s)</td>
|
||||
<td>7.51<br>
|
||||
(4.81e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.4e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>+3.14159</td>
|
||||
<td>1.32<br>
|
||||
(8.97e-07s)</td>
|
||||
<td>1.31<br>
|
||||
(8.88e-07s)</td>
|
||||
<td>14<br>
|
||||
(9.48e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.78e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>-3.14159</td>
|
||||
<td>1.32<br>
|
||||
(8.97e-07s)</td>
|
||||
<td>1.31<br>
|
||||
(8.88e-07s)</td>
|
||||
<td>14<br>
|
||||
(9.48e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.78e-07s)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<p><i><EFBFBD> Copyright John Maddock 2003</i></p>
|
||||
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
||||
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
||||
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -3,20 +3,19 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Background Information</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="ref/deprecated_interfaces/old_regex.html" title=" High
|
||||
Level Class RegEx (Deprecated)">
|
||||
<link rel="next" href="background_information/headers.html" title=" Headers">
|
||||
<link rel="prev" href="ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">
|
||||
<link rel="next" href="background_information/headers.html" title="Headers">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.background_information"></a><a href="background_information.html" title="Background Information">Background Information</a></h2></div></div></div>
|
||||
<a name="boost_regex.background_information"></a><a href="background_information.html" title="Background Information">Background Information</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="background_information/headers.html"> Headers</a></span></dt>
|
||||
<dt><span class="section"><a href="background_information/locale.html"> Localization</a></span></dt>
|
||||
@ -44,31 +44,14 @@
|
||||
Acknowledgements</a></span></dt>
|
||||
<dt><span class="section"><a href="background_information/history.html"> History</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Acknowledgements</title>
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="redist.html" title=" Redistributables">
|
||||
<link rel="next" href="history.html" title=" History">
|
||||
<link rel="prev" href="redist.html" title="Redistributables">
|
||||
<link rel="next" href="history.html" title="History">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.acknowledgements"></a><a href="acknowledgements.html" title="
|
||||
Acknowledgements">
|
||||
Acknowledgements</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.acknowledgements"></a><a href="acknowledgements.html" title="Acknowledgements">
|
||||
Acknowledgements</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The author can be contacted at john - at - johnmaddock.co.uk; the home page
|
||||
for this library is at <a href="http://www.boost.org" target="_top">www.boost.org</a>.
|
||||
@ -75,10 +74,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Test and
|
||||
Example Programs</title>
|
||||
<title>Test and Example Programs</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="thread_safety.html" title=" Thread
|
||||
Safety">
|
||||
<link rel="next" href="futher.html" title=" References
|
||||
and Further Information">
|
||||
<link rel="prev" href="thread_safety.html" title="Thread Safety">
|
||||
<link rel="next" href="futher.html" title="References and Further Information">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,16 +24,16 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.examples"></a><a href="examples.html" title=" Test and
|
||||
Example Programs"> Test and
|
||||
Example Programs</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.examples.test_programs"></a><h4>
|
||||
<a name="id614398"></a>
|
||||
<a name="boost_regex.background_information.examples"></a><a href="examples.html" title="Test and Example Programs"> Test and
|
||||
Example Programs</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.examples.test_programs"></a><h5>
|
||||
<a name="id657134"></a>
|
||||
<a href="examples.html#boost_regex.background_information.examples.test_programs">Test
|
||||
Programs</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
<span class="bold"><b>regress:</b></span>
|
||||
<span class="bold"><strong>regress:</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
A regression test application that gives the matching/searching algorithms
|
||||
@ -46,67 +43,76 @@
|
||||
it.
|
||||
</p>
|
||||
<p>
|
||||
Directory: <a href="../../../../test/regress" target="_top">libs/regex/test/regress</a>.
|
||||
Files:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../../../../test/regress/main.cpp" target="_top">main.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/basic_tests.cpp" target="_top">basic_tests.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_alt.cpp" target="_top">test_alt.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_anchors.cpp" target="_top">test_anchors.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_asserts.cpp" target="_top">test_asserts.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_backrefs.cpp" target="_top">test_backrefs.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_deprecated.cpp" target="_top">test_deprecated.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_emacs.cpp" target="_top">test_emacs.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_escapes.cpp" target="_top">test_escapes.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_grep.cpp" target="_top">test_grep.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_icu.cpp" target="_top">test_icu.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_locale.cpp" target="_top">test_locale.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_mfc.cpp" target="_top">test_mfc.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_non_greedy_repeats.cpp" target="_top">test_non_greedy_repeats.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_operators.cpp" target="_top">test_operators.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_overloads.cpp" target="_top">test_overloads.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_perl_ex.cpp" target="_top">test_perl_ex.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_replace.cpp" target="_top">test_replace.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_sets.cpp" target="_top">test_sets.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_simple_repeats.cpp" target="_top">test_simple_repeats.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_tricky_cases.cpp" target="_top">test_tricky_cases.cpp</a></li>
|
||||
<li><a href="../../../../test/regress/test_unicode.cpp" target="_top">test_unicode.cpp</a></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
Files: See directory.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>bad_expression_test:</b></span>
|
||||
<span class="bold"><strong>bad_expression_test:</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
Verifies that "bad" regular expressions don't cause the matcher
|
||||
to go into infinite loops, but to throw an exception instead.
|
||||
</p>
|
||||
<p>
|
||||
Directory: <a href="../../../../test/pathology" target="_top">libs/regex/test/pathology</a>.
|
||||
</p>
|
||||
<p>
|
||||
Files: <a href="../../../../test/pathology/bad_expression_test.cpp" target="_top">bad_expression_test.cpp</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>recursion_test:</b></span>
|
||||
<span class="bold"><strong>recursion_test:</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
Verifies that the matcher can't overrun the stack (no matter what the expression).
|
||||
</p>
|
||||
<p>
|
||||
Directory: <a href="../../../../test/pathology" target="_top">libs/regex/test/pathology</a>.
|
||||
</p>
|
||||
<p>
|
||||
Files: <a href="../../../../test/pathology/recursion_test.cpp" target="_top">recursion_test.cpp</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>concepts:</b></span>
|
||||
<span class="bold"><strong>concepts:</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
Verifies that the library meets all documented concepts (a compile only test).
|
||||
</p>
|
||||
<p>
|
||||
Directory: <a href="../../../../test/concepts" target="_top">libs/regex/test/concepts</a>.
|
||||
</p>
|
||||
<p>
|
||||
Files: <a href="../../../../test/concepts/concept_check.cpp" target="_top">concept_check.cpp</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>captures_test:</b></span>
|
||||
<span class="bold"><strong>captures_test:</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
Test code for captures.
|
||||
</p>
|
||||
<p>
|
||||
Directory: <a href="../../../../test/captures" target="_top">libs/test/captures</a>.
|
||||
</p>
|
||||
<p>
|
||||
Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.examples.example_programs"></a><h4>
|
||||
<a name="id614615"></a>
|
||||
<a name="boost_regex.background_information.examples.example_programs"></a><h5>
|
||||
<a name="id657522"></a>
|
||||
<a href="examples.html#boost_regex.background_information.examples.example_programs">Example
|
||||
programs</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
<span class="bold"><b>grep</b></span>
|
||||
<span class="bold"><strong>grep</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
A simple grep implementation, run with the -h command line option to find
|
||||
@ -116,7 +122,7 @@
|
||||
Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>timer.exe</b></span>
|
||||
<span class="bold"><strong>timer.exe</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
A simple interactive expression matching application, the results of all
|
||||
@ -126,11 +132,11 @@
|
||||
<p>
|
||||
Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.examples.code_snippets"></a><h4>
|
||||
<a name="id614698"></a>
|
||||
<a name="boost_regex.background_information.examples.code_snippets"></a><h5>
|
||||
<a name="id657602"></a>
|
||||
<a href="examples.html#boost_regex.background_information.examples.code_snippets">Code
|
||||
snippets</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The snippets examples contain the code examples used in the documentation:
|
||||
</p>
|
||||
@ -211,10 +217,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> FAQ</title>
|
||||
<title>FAQ</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="futher.html" title=" References
|
||||
and Further Information">
|
||||
<link rel="next" href="performance.html" title=" Performance">
|
||||
<link rel="prev" href="futher.html" title="References and Further Information">
|
||||
<link rel="next" href="performance.html" title="Performance">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,13 +24,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.faq"></a><a href="faq.html" title=" FAQ"> FAQ</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.faq"></a><a href="faq.html" title="FAQ"> FAQ</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
<span class="bold"><b>Q.</b></span> I can't get regex++ to work with escape
|
||||
<span class="bold"><strong>Q.</strong></span> I can't get regex++ to work with escape
|
||||
characters, what's going on?
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>A.</b></span> If you embed regular expressions in C++
|
||||
<span class="bold"><strong>A.</strong></span> If you embed regular expressions in C++
|
||||
code, then remember that escape characters are processed twice: once by the
|
||||
C++ compiler, and once by the Boost.Regex expression compiler, so to pass
|
||||
the regular expression \d+ to Boost.Regex, you need to embed "\d+"
|
||||
@ -39,21 +39,21 @@
|
||||
"\\" in your code.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Q.</b></span> No matter what I do regex_match always
|
||||
<span class="bold"><strong>Q.</strong></span> No matter what I do regex_match always
|
||||
returns false, what's going on?
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>A.</b></span> The algorithm regex_match only succeeds
|
||||
if the expression matches <span class="bold"><b>all</b></span> of the text,
|
||||
if you want to <span class="bold"><b>find</b></span> a sub-string within
|
||||
<span class="bold"><strong>A.</strong></span> The algorithm regex_match only succeeds
|
||||
if the expression matches <span class="bold"><strong>all</strong></span> of the text,
|
||||
if you want to <span class="bold"><strong>find</strong></span> a sub-string within
|
||||
the text that matches the expression then use regex_search instead.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Q.</b></span> Why does using parenthesis in a POSIX
|
||||
<span class="bold"><strong>Q.</strong></span> Why does using parenthesis in a POSIX
|
||||
regular expression change the result of a match?
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>A.</b></span> For POSIX (extended and basic) regular
|
||||
<span class="bold"><strong>A.</strong></span> For POSIX (extended and basic) regular
|
||||
expressions, but not for perl regexes, parentheses don't only mark; they
|
||||
determine what the best match is as well. When the expression is compiled
|
||||
as a POSIX basic or extended regex then Boost.Regex follows the POSIX standard
|
||||
@ -85,11 +85,11 @@
|
||||
as the expression.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Q.</b></span> Why don't character ranges work properly
|
||||
<span class="bold"><strong>Q.</strong></span> Why don't character ranges work properly
|
||||
(POSIX mode only)?
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>A.</b></span> The POSIX standard specifies that character
|
||||
<span class="bold"><strong>A.</strong></span> The POSIX standard specifies that character
|
||||
range expressions are locale sensitive - so for example the expression [A-Z]
|
||||
will match any collating element that collates between 'A' and 'Z'. That
|
||||
means that for most locales other than "C" or "POSIX",
|
||||
@ -97,39 +97,39 @@
|
||||
most people expect - or at least not what most people have come to expect
|
||||
from regular expression engines. For this reason, the default behaviour of
|
||||
Boost.Regex (perl mode) is to turn locale sensitive collation off by not
|
||||
setting the <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">collate</span></tt>
|
||||
setting the <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">collate</span></code>
|
||||
compile time flag. However if you set a non-default compile time flag - for
|
||||
example <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></tt> or <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></tt>,
|
||||
example <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></code> or <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></code>,
|
||||
then locale dependent collation will be enabled, this also applies to the
|
||||
POSIX API functions which use either <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></tt>
|
||||
or <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></tt> internally. [Note - when <tt class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">nocollate</span></tt> in effect, the library behaves
|
||||
POSIX API functions which use either <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">extended</span></code>
|
||||
or <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">basic</span></code> internally. [Note - when <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">nocollate</span></code> in effect, the library behaves
|
||||
"as if" the LC_COLLATE locale category were always "C",
|
||||
regardless of what its actually set to - end note].
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Q.</b></span> Why are there no throw specifications
|
||||
<span class="bold"><strong>Q.</strong></span> Why are there no throw specifications
|
||||
on any of the functions? What exceptions can the library throw?
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>A.</b></span> Not all compilers support (or honor)
|
||||
<span class="bold"><strong>A.</strong></span> Not all compilers support (or honor)
|
||||
throw specifications, others support them but with reduced efficiency. Throw
|
||||
specifications may be added at a later date as compilers begin to handle
|
||||
this better. The library should throw only three types of exception: [boost::regex_error]
|
||||
can be thrown by <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> when compiling a regular
|
||||
expression, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt> can be thrown when a call
|
||||
to <tt class="computeroutput"><span class="identifier">basic_regex</span><span class="special">::</span><span class="identifier">imbue</span></tt> tries to open a message catalogue
|
||||
that doesn't exist, or when a call to <a href="../ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> or <a href="../ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> results in an "everlasting"
|
||||
search, or when a call to <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">GrepFiles</span></tt>
|
||||
or <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">FindFiles</span></tt> tries to open a file that cannot
|
||||
be opened, finally <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></tt> can be thrown by just about any
|
||||
can be thrown by <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> when compiling a regular
|
||||
expression, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code> can be thrown when a call
|
||||
to <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special">::</span><span class="identifier">imbue</span></code> tries to open a message catalogue
|
||||
that doesn't exist, or when a call to <a href="../ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> or <a href="../ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a> results in an "everlasting"
|
||||
search, or when a call to <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">GrepFiles</span></code>
|
||||
or <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">FindFiles</span></code> tries to open a file that cannot
|
||||
be opened, finally <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_alloc</span></code> can be thrown by just about any
|
||||
of the functions in this library.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Q.</b></span> Why can't I use the "convenience"
|
||||
<span class="bold"><strong>Q.</strong></span> Why can't I use the "convenience"
|
||||
versions of regex_match / regex_search / regex_grep / regex_format / regex_merge?
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>A.</b></span> These versions may or may not be available
|
||||
<span class="bold"><strong>A.</strong></span> These versions may or may not be available
|
||||
depending upon the capabilities of your compiler, the rules determining the
|
||||
format of these functions are quite complex - and only the versions visible
|
||||
to a standard compliant compiler are given in the help. To find out what
|
||||
@ -141,10 +141,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> References
|
||||
and Further Information</title>
|
||||
<title>References and Further Information</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="examples.html" title=" Test and
|
||||
Example Programs">
|
||||
<link rel="next" href="faq.html" title=" FAQ">
|
||||
<link rel="prev" href="examples.html" title="Test and Example Programs">
|
||||
<link rel="next" href="faq.html" title="FAQ">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.futher"></a><a href="futher.html" title=" References
|
||||
and Further Information"> References
|
||||
and Further Information</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.futher"></a><a href="futher.html" title="References and Further Information"> References
|
||||
and Further Information</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Short tutorials on regular expressions can be <a href="http://etext.lib.virginia.edu/helpsheets/regex.html" target="_top">found
|
||||
here</a> and <a href="http://www.linuxpcug.org/lessons/regexp.html" target="_top">here</a>.
|
||||
@ -64,10 +62,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Headers</title>
|
||||
<title>Headers</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="../background_information.html" title="Background Information">
|
||||
<link rel="next" href="locale.html" title=" Localization">
|
||||
<link rel="next" href="locale.html" title="Localization">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,25 +24,27 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.headers"></a><a href="headers.html" title=" Headers"> Headers</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.headers"></a><a href="headers.html" title="Headers"> Headers</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
There are two main headers used by this library: <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
provides full access to the main template library, while <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
There are two main headers used by this library: <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
provides full access to the main template library, while <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
provides access to the (deprecated) high level class RegEx, and the POSIX
|
||||
API functions.
|
||||
</p>
|
||||
<p>
|
||||
There is also a header containing only forward declarations <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
for use when an interface is dependent upon <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>, but otherwise does
|
||||
There is also a header containing only forward declarations <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
for use when an interface is dependent upon <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>, but otherwise does
|
||||
not need the full definitions.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> History</title>
|
||||
<title>History</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="acknowledgements.html" title="
|
||||
Acknowledgements">
|
||||
<link rel="prev" href="acknowledgements.html" title="Acknowledgements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,12 +23,13 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.history"></a><a href="history.html" title=" History"> History</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_34"></a><h4>
|
||||
<a name="id616902"></a>
|
||||
<a name="boost_regex.background_information.history"></a><a href="history.html" title="History"> History</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_34"></a><h5>
|
||||
<a name="id659744"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_34">Boost
|
||||
1.34</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Fix for non-greedy repeats and partial matches not working correctly in
|
||||
@ -48,11 +48,11 @@
|
||||
the same as |.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h4>
|
||||
<a name="id616955"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
|
||||
<a name="id659795"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
|
||||
1.33.1</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Fixed broken makefiles.
|
||||
@ -118,11 +118,11 @@
|
||||
Fixed bug that allowed some invalid expressions to be accepted.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h4>
|
||||
<a name="id617086"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_0"></a><h5>
|
||||
<a name="id659924"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
|
||||
1.33.0</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Completely rewritten expression parsing code, and traits class support;
|
||||
@ -173,19 +173,19 @@
|
||||
in the expression the error occured.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h4>
|
||||
<a name="id617194"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
|
||||
<a name="id660024"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
|
||||
1.32.1</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
Fixed bug in partial matches of bounded repeats of '.'.
|
||||
</li></ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_31_0"></a><h4>
|
||||
<a name="id617229"></a>
|
||||
<a name="boost_regex.background_information.history.boost_1_31_0"></a><h5>
|
||||
<a name="id660057"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
|
||||
1.31.0</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Completely rewritten pattern matching code - it is now up to 10 times faster
|
||||
@ -220,10 +220,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Localization</title>
|
||||
<title>Localization</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="headers.html" title=" Headers">
|
||||
<link rel="next" href="thread_safety.html" title=" Thread
|
||||
Safety">
|
||||
<link rel="prev" href="headers.html" title="Headers">
|
||||
<link rel="next" href="thread_safety.html" title="Thread Safety">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.locale"></a><a href="locale.html" title=" Localization"> Localization</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.locale"></a><a href="locale.html" title="Localization"> Localization</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Boost.Regex provides extensive support for run-time localization, the localization
|
||||
model used can be split into two parts: front-end and back-end.
|
||||
@ -57,52 +57,50 @@
|
||||
<p>
|
||||
There are three separate localization mechanisms supported by Boost.Regex:
|
||||
</p>
|
||||
<a name="boost_regex.background_information.locale.win32_localization_model_"></a><h4>
|
||||
<a name="id610859"></a>
|
||||
<a name="boost_regex.background_information.locale.win32_localization_model_"></a><h5>
|
||||
<a name="id653642"></a>
|
||||
<a href="locale.html#boost_regex.background_information.locale.win32_localization_model_">Win32
|
||||
localization model.</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
This is the default model when the library is compiled under Win32, and is
|
||||
encapsulated by the traits class <tt class="computeroutput"><span class="identifier">w32_regex_traits</span></tt>.
|
||||
When this model is in effect each <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> object gets it's own
|
||||
encapsulated by the traits class <code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>.
|
||||
When this model is in effect each <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> object gets it's own
|
||||
LCID, by default this is the users default setting as returned by GetUserDefaultLCID,
|
||||
but you can call imbue on the <tt class="computeroutput"><span class="identifier">basic_regex</span></tt>
|
||||
but you can call imbue on the <code class="computeroutput"><span class="identifier">basic_regex</span></code>
|
||||
object to set it's locale to some other LCID if you wish. All the settings
|
||||
used by Boost.Regex are acquired directly from the operating system bypassing
|
||||
the C run time library. Front-end localization requires a resource dll, containing
|
||||
a string table with the user-defined strings. The traits class exports the
|
||||
function:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
which needs to be called with a string identifying the name of the resource
|
||||
dll, before your code compiles any regular expressions (but not necessarily
|
||||
before you construct any <tt class="computeroutput"><span class="identifier">basic_regex</span></tt>
|
||||
before you construct any <code class="computeroutput"><span class="identifier">basic_regex</span></code>
|
||||
instances):
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">w32_regex_traits</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mydll.dll"</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">w32_regex_traits</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mydll.dll"</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The library provides full Unicode support under NT, under Windows 9x the
|
||||
library degrades gracefully - characters 0 to 255 are supported, the remainder
|
||||
are treated as "unknown" graphic characters.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.locale.c_localization_model_"></a><h4>
|
||||
<a name="id611109"></a>
|
||||
<a name="boost_regex.background_information.locale.c_localization_model_"></a><h5>
|
||||
<a name="id653880"></a>
|
||||
<a href="locale.html#boost_regex.background_information.locale.c_localization_model_">C
|
||||
localization model.</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
This model has been deprecated in favor of the C++ locale for all non-Windows
|
||||
compilers that support it. This locale is encapsulated by the traits class
|
||||
<tt class="computeroutput"><span class="identifier">c_regex_traits</span></tt>, Win32 users
|
||||
<code class="computeroutput"><span class="identifier">c_regex_traits</span></code>, Win32 users
|
||||
can force this model to take effect by defining the pre-processor symbol
|
||||
BOOST_REGEX_USE_C_LOCALE. When this model is in effect there is a single
|
||||
global locale, as set by <tt class="computeroutput"><span class="identifier">setlocale</span></tt>.
|
||||
global locale, as set by <code class="computeroutput"><span class="identifier">setlocale</span></code>.
|
||||
All settings are acquired from your run time library, consequently Unicode
|
||||
support is dependent upon your run time library implementation.
|
||||
</p>
|
||||
@ -111,54 +109,52 @@
|
||||
</p>
|
||||
<p>
|
||||
Note that calling setlocale invalidates all compiled regular expressions,
|
||||
calling <tt class="computeroutput"><span class="identifier">setlocale</span><span class="special">(</span><span class="identifier">LC_ALL</span><span class="special">,</span> <span class="string">"C"</span><span class="special">)</span></tt>
|
||||
calling <code class="computeroutput"><span class="identifier">setlocale</span><span class="special">(</span><span class="identifier">LC_ALL</span><span class="special">,</span> <span class="string">"C"</span><span class="special">)</span></code>
|
||||
will make this library behave equivalent to most traditional regular expression
|
||||
libraries including version 1 of this library.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.locale.c___localization_model_"></a><h4>
|
||||
<a name="id611224"></a>
|
||||
<a name="boost_regex.background_information.locale.c___localization_model_"></a><h5>
|
||||
<a name="id653992"></a>
|
||||
<a href="locale.html#boost_regex.background_information.locale.c___localization_model_">C++
|
||||
localization model.</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
This model is the default for non-Windows compilers.
|
||||
</p>
|
||||
<p>
|
||||
When this model is in effect each instance of <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> has its own instance
|
||||
of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span></tt>, class <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> also has a member function
|
||||
<tt class="computeroutput"><span class="identifier">imbue</span></tt> which allows the locale
|
||||
When this model is in effect each instance of <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> has its own instance
|
||||
of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span></code>, class <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> also has a member function
|
||||
<code class="computeroutput"><span class="identifier">imbue</span></code> which allows the locale
|
||||
for the expression to be set on a per-instance basis. Front end localization
|
||||
requires a POSIX message catalogue, which will be loaded via the <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">messages</span></tt>
|
||||
requires a POSIX message catalogue, which will be loaded via the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">messages</span></code>
|
||||
facet of the expression's locale, the traits class exports the symbol:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
which needs to be called with a string identifying the name of the message
|
||||
catalogue, before your code compiles any regular expressions (but not necessarily
|
||||
before you construct any basic_regex instances):
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">cpp_regex_traits</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mycatalogue"</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">cpp_regex_traits</span><span class="special"><</span><span class="keyword">char</span><span class="special">>::</span><span class="identifier">set_message_catalogue</span><span class="special">(</span><span class="string">"mycatalogue"</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
Note that calling <tt class="computeroutput"><span class="identifier">basic_regex</span><span class="special"><>::</span><span class="identifier">imbue</span></tt>
|
||||
will invalidate any expression currently compiled in that instance of <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>.
|
||||
Note that calling <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special"><>::</span><span class="identifier">imbue</span></code>
|
||||
will invalidate any expression currently compiled in that instance of <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>.
|
||||
</p>
|
||||
<p>
|
||||
Finally note that if you build the library with a non-default localization
|
||||
model, then the appropriate pre-processor symbol (BOOST_REGEX_USE_C_LOCALE
|
||||
or BOOST_REGEX_USE_CPP_LOCALE) must be defined both when you build the support
|
||||
library, and when you include <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
or <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
in your code. The best way to ensure this is to add the #define to <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>.
|
||||
library, and when you include <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
or <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
in your code. The best way to ensure this is to add the #define to <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">user</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h4>
|
||||
<a name="id611693"></a>
|
||||
<a name="boost_regex.background_information.locale.providing_a_message_catalogue"></a><h5>
|
||||
<a name="id654452"></a>
|
||||
<a href="locale.html#boost_regex.background_information.locale.providing_a_message_catalogue">Providing
|
||||
a message catalogue</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
In order to localize the front end of the library, you need to provide the
|
||||
library with the appropriate message strings contained either in a resource
|
||||
@ -1272,7 +1268,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
"Unmatched [ or <tt class="literal">" </tt>
|
||||
"Unmatched [ or <code class="literal">" </code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -1779,10 +1775,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Performance</title>
|
||||
<title>Performance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="faq.html" title=" FAQ">
|
||||
<link rel="next" href="standards.html" title=" Standards
|
||||
Conformance">
|
||||
<link rel="prev" href="faq.html" title="FAQ">
|
||||
<link rel="next" href="standards.html" title="Standards Conformance">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.performance"></a><a href="performance.html" title=" Performance"> Performance</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.performance"></a><a href="performance.html" title="Performance"> Performance</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The performance of Boost.Regex in both recursive and non-recursive modes
|
||||
should be broadly comparable to other regular expression libraries: recursive
|
||||
@ -46,10 +46,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Redistributables</title>
|
||||
<title>Redistributables</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="standards.html" title=" Standards
|
||||
Conformance">
|
||||
<link rel="next" href="acknowledgements.html" title="
|
||||
Acknowledgements">
|
||||
<link rel="prev" href="standards.html" title="Standards Conformance">
|
||||
<link rel="next" href="acknowledgements.html" title="Acknowledgements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.redist"></a><a href="redist.html" title=" Redistributables"> Redistributables</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.redist"></a><a href="redist.html" title="Redistributables"> Redistributables</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
If you are using Microsoft or Borland C++ and link to a dll version of the
|
||||
run time library, then you can choose to also link to a dll version of Boost.Regex
|
||||
@ -48,10 +47,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Standards
|
||||
Conformance</title>
|
||||
<title>Standards Conformance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="performance.html" title=" Performance">
|
||||
<link rel="next" href="redist.html" title=" Redistributables">
|
||||
<link rel="prev" href="performance.html" title="Performance">
|
||||
<link rel="next" href="redist.html" title="Redistributables">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,22 +24,22 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.standards"></a><a href="standards.html" title=" Standards
|
||||
Conformance"> Standards
|
||||
Conformance</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.standards.c__"></a><h4>
|
||||
<a name="id615703"></a>
|
||||
<a name="boost_regex.background_information.standards"></a><a href="standards.html" title="Standards Conformance"> Standards
|
||||
Conformance</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.background_information.standards.c__"></a><h5>
|
||||
<a name="id658582"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.c__">C++</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Boost.Regex is intended to conform to the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
|
||||
Report on C++ Library Extensions</a>.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h4>
|
||||
<a name="id615743"></a>
|
||||
<a name="boost_regex.background_information.standards.ecmascript___javascript"></a><h5>
|
||||
<a name="id658620"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
|
||||
/ JavaScript</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
All of the ECMAScript regular expression syntax features are supported, except
|
||||
that:
|
||||
@ -49,10 +48,10 @@
|
||||
The escape sequence \u matches any upper case character (the same as [[:upper:]])
|
||||
rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.perl"></a><h4>
|
||||
<a name="id615784"></a>
|
||||
<a name="boost_regex.background_information.standards.perl"></a><h5>
|
||||
<a name="id658659"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Almost all Perl features are supported, except for:
|
||||
</p>
|
||||
@ -62,10 +61,10 @@
|
||||
<p>
|
||||
(??{code}) Not implementable in a compiled strongly typed language.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.posix"></a><h4>
|
||||
<a name="id615824"></a>
|
||||
<a name="boost_regex.background_information.standards.posix"></a><h5>
|
||||
<a name="id658698"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
All the POSIX basic and extended regular expression features are supported,
|
||||
except that:
|
||||
@ -82,10 +81,10 @@
|
||||
implementation doesn't work on your platform, then you will need to supply
|
||||
a custom traits class.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.unicode"></a><h4>
|
||||
<a name="id615873"></a>
|
||||
<a name="boost_regex.background_information.standards.unicode"></a><h5>
|
||||
<a name="id658745"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following comments refer to <a href="http://unicode.org/reports/tr18/" target="_top">Unicode
|
||||
Technical Standard #18: Unicode Regular Expressions version 11</a>.
|
||||
@ -165,13 +164,13 @@
|
||||
Indirectly support by forward-lookahead:
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(?=[[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></tt>
|
||||
<code class="computeroutput"><span class="special">(?=[[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></code>
|
||||
</p>
|
||||
<p>
|
||||
Gives the intersection of character properties X and Y.
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(?![[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></tt>
|
||||
<code class="computeroutput"><span class="special">(?![[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></code>
|
||||
</p>
|
||||
<p>
|
||||
Gives everything in Y that is not in X (subtraction).
|
||||
@ -469,7 +468,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported: pass the flag <tt class="computeroutput"><span class="identifier">match_partial</span></tt>
|
||||
Supported: pass the flag <code class="computeroutput"><span class="identifier">match_partial</span></code>
|
||||
to the regex algorithms.
|
||||
</p>
|
||||
</td>
|
||||
@ -550,10 +549,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Thread
|
||||
Safety</title>
|
||||
<title>Thread Safety</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../background_information.html" title="Background Information">
|
||||
<link rel="prev" href="locale.html" title=" Localization">
|
||||
<link rel="next" href="examples.html" title=" Test and
|
||||
Example Programs">
|
||||
<link rel="prev" href="locale.html" title="Localization">
|
||||
<link rel="next" href="examples.html" title="Test and Example Programs">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,44 +24,43 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.background_information.thread_safety"></a><a href="thread_safety.html" title=" Thread
|
||||
Safety"> Thread
|
||||
Safety</a></h3></div></div></div>
|
||||
<a name="boost_regex.background_information.thread_safety"></a><a href="thread_safety.html" title="Thread Safety"> Thread
|
||||
Safety</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The Boost.Regex library is thread safe when Boost is: you can verify that
|
||||
Boost is in thread safe mode by checking to see if <tt class="computeroutput"><span class="identifier">BOOST_HAS_THREADS</span></tt>
|
||||
Boost is in thread safe mode by checking to see if <code class="computeroutput"><span class="identifier">BOOST_HAS_THREADS</span></code>
|
||||
is defined: this macro is set automatically by the config system when threading
|
||||
support is turned on in your compiler.
|
||||
</p>
|
||||
<p>
|
||||
Class <a href="../ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>
|
||||
Class <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
|
||||
and its typedefs regex and wregex are thread safe, in that compiled regular
|
||||
expressions can safely be shared between threads. The matching algorithms
|
||||
<a href="../ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>,
|
||||
<a href="../ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>,
|
||||
and <a href="../ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>
|
||||
are all re-entrant and thread safe. Class <a href="../ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> is now thread safe,
|
||||
<a href="../ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>,
|
||||
<a href="../ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>,
|
||||
and <a href="../ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>
|
||||
are all re-entrant and thread safe. Class <a href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> is now thread safe,
|
||||
in that the results of a match can be safely copied from one thread to another
|
||||
(for example one thread may find matches and push <a href="../ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> instances onto a queue,
|
||||
(for example one thread may find matches and push <a href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> instances onto a queue,
|
||||
while another thread pops them off the other end), otherwise use a separate
|
||||
instance of <a href="../ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>
|
||||
instance of <a href="../ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
|
||||
per thread.
|
||||
</p>
|
||||
<p>
|
||||
The <a href="../ref/posix.html" title=" POSIX Compatible C API's">POSIX API functions</a> are
|
||||
The <a href="../ref/posix.html" title="POSIX Compatible C API's">POSIX API functions</a> are
|
||||
all re-entrant and thread safe, regular expressions compiled with regcomp
|
||||
can also be shared between threads.
|
||||
</p>
|
||||
<p>
|
||||
The <a href="../ref/deprecated_interfaces/old_regex.html" title=" High
|
||||
Level Class RegEx (Deprecated)">class
|
||||
The <a href="../ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)">class
|
||||
RegEx</a> is only thread safe if each thread gets its own RegEx instance
|
||||
(apartment threading) - this is a consequence of RegEx handling both compiling
|
||||
and matching regular expressions.
|
||||
</p>
|
||||
<p>
|
||||
Finally note that changing the global locale invalidates all compiled regular
|
||||
expressions, therefore calling <tt class="computeroutput"><span class="identifier">set_locale</span></tt>
|
||||
expressions, therefore calling <code class="computeroutput"><span class="identifier">set_locale</span></code>
|
||||
from one thread while another uses regular expressions will produce unpredictable
|
||||
results.
|
||||
</p>
|
||||
@ -74,10 +71,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Understanding Marked Sub-Expressions
|
||||
and Captures</title>
|
||||
<title>Understanding Marked Sub-Expressions and Captures</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="unicode.html" title=" Unicode and Boost.Regex">
|
||||
<link rel="next" href="partial_matches.html" title=" Partial Matches">
|
||||
<link rel="prev" href="unicode.html" title="Unicode and Boost.Regex">
|
||||
<link rel="next" href="partial_matches.html" title="Partial Matches">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.captures"></a><a href="captures.html" title=" Understanding Marked Sub-Expressions
|
||||
and Captures"> Understanding Marked Sub-Expressions
|
||||
and Captures</a></h2></div></div></div>
|
||||
<a name="boost_regex.captures"></a><a href="captures.html" title="Understanding Marked Sub-Expressions and Captures"> Understanding Marked Sub-Expressions
|
||||
and Captures</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
Captures are the iterator ranges that are "captured" by marked sub-expressions
|
||||
as a regular expression gets matched. Each marked sub-expression can result
|
||||
@ -35,12 +34,12 @@
|
||||
how captures and marked sub-expressions in Boost.Regex are represented and
|
||||
accessed.
|
||||
</p>
|
||||
<a name="boost_regex.captures.marked_sub_expressions"></a><h4>
|
||||
<a name="id459027"></a>
|
||||
<a name="boost_regex.captures.marked_sub_expressions"></a><h5>
|
||||
<a name="id502903"></a>
|
||||
<a href="captures.html#boost_regex.captures.marked_sub_expressions">Marked sub-expressions</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Every time a Perl regular expression contains a parenthesis group <tt class="computeroutput"><span class="special">()</span></tt>, it spits out an extra field, known as a
|
||||
Every time a Perl regular expression contains a parenthesis group <code class="computeroutput"><span class="special">()</span></code>, it spits out an extra field, known as a
|
||||
marked sub-expression, for example the expression:
|
||||
</p>
|
||||
<pre class="programlisting">(\w+)\W+(\w+)</pre>
|
||||
@ -48,7 +47,7 @@
|
||||
Has two marked sub-expressions (known as $1 and $2 respectively), in addition
|
||||
the complete match is known as $&, everything before the first match as
|
||||
$`, and everything after the match as $'. So if the above expression is searched
|
||||
for within <tt class="computeroutput"><span class="string">"@abc def--"</span></tt>,
|
||||
for within <code class="computeroutput"><span class="string">"@abc def--"</span></code>,
|
||||
then we obtain:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -132,11 +131,10 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
In Boost.Regex all these are accessible via the <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> class that gets filled
|
||||
in when calling one of the regular expression matching algorithms ( <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, or <a href="ref/regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>). So given:
|
||||
In Boost.Regex all these are accessible via the <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> class that gets filled
|
||||
in when calling one of the regular expression matching algorithms ( <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, or <a href="ref/regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>). So given:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">IteratorType</span><span class="special">></span> <span class="identifier">m</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">IteratorType</span><span class="special">></span> <span class="identifier">m</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
The Perl and Boost.Regex equivalents are as follows:
|
||||
@ -167,7 +165,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -179,7 +177,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -191,7 +189,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">]</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">]</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -203,26 +201,26 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
In Boost.Regex each sub-expression match is represented by a <a href="ref/sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> object, this is basically
|
||||
In Boost.Regex each sub-expression match is represented by a <a href="ref/sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object, this is basically
|
||||
just a pair of iterators denoting the start and end position of the sub-expression
|
||||
match, but there are some additional operators provided so that objects of
|
||||
type <a href="ref/sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
behave a lot like a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>: for example they are implicitly
|
||||
convertible to a <tt class="computeroutput"><span class="identifier">basic_string</span></tt>,
|
||||
type <a href="ref/sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
behave a lot like a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>: for example they are implicitly
|
||||
convertible to a <code class="computeroutput"><span class="identifier">basic_string</span></code>,
|
||||
they can be compared to a string, added to a string, or streamed out to an
|
||||
output stream.
|
||||
</p>
|
||||
<a name="boost_regex.captures.unmatched_sub_expressions"></a><h4>
|
||||
<a name="id459648"></a>
|
||||
<a name="boost_regex.captures.unmatched_sub_expressions"></a><h5>
|
||||
<a name="id503526"></a>
|
||||
<a href="captures.html#boost_regex.captures.unmatched_sub_expressions">Unmatched Sub-Expressions</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
When a regular expression match is found there is no need for all of the marked
|
||||
sub-expressions to have participated in the match, for example the expression:
|
||||
@ -230,12 +228,12 @@
|
||||
<pre class="programlisting">(abc)|(def)</pre>
|
||||
<p>
|
||||
can match either $1 or $2, but never both at the same time. In Boost.Regex
|
||||
you can determine which sub-expressions matched by accessing the <tt class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></tt> data member.
|
||||
you can determine which sub-expressions matched by accessing the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">matched</span></code> data member.
|
||||
</p>
|
||||
<a name="boost_regex.captures.repeated_captures"></a><h4>
|
||||
<a name="id459714"></a>
|
||||
<a name="boost_regex.captures.repeated_captures"></a><h5>
|
||||
<a name="id503588"></a>
|
||||
<a href="captures.html#boost_regex.captures.repeated_captures">Repeated Captures</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
When a marked sub-expression is repeated, then the sub-expression gets "captured"
|
||||
multiple times, however normally only the final capture is available, for example
|
||||
@ -252,13 +250,12 @@
|
||||
</p>
|
||||
<p>
|
||||
However, Boost.Regex has an experimental feature that allows all the capture
|
||||
information to be retained - this is accessed either via the <tt class="computeroutput"><span class="identifier">match_results</span><span class="special">::</span><span class="identifier">captures</span></tt> member function or the <tt class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">captures</span></tt> member function. These functions
|
||||
information to be retained - this is accessed either via the <code class="computeroutput"><span class="identifier">match_results</span><span class="special">::</span><span class="identifier">captures</span></code> member function or the <code class="computeroutput"><span class="identifier">sub_match</span><span class="special">::</span><span class="identifier">captures</span></code> member function. These functions
|
||||
return a container that contains a sequence of all the captures obtained during
|
||||
the regular expression matching. The following example program shows how this
|
||||
information may be used:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">print_captures</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">regx</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
@ -372,10 +369,11 @@ Text: "now is the time for all good men to come to the aid of the party"
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Configuration</title>
|
||||
<title>Configuration</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="../index.html" title="Boost.Regex">
|
||||
<link rel="next" href="configuration/compiler.html" title=" Compiler Setup">
|
||||
<link rel="next" href="configuration/compiler.html" title="Compiler Setup">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.configuration"></a><a href="configuration.html" title=" Configuration"> Configuration</a></h2></div></div></div>
|
||||
<a name="boost_regex.configuration"></a><a href="configuration.html" title="Configuration"> Configuration</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="configuration/compiler.html"> Compiler Setup</a></span></dt>
|
||||
<dt><span class="section"><a href="configuration/locale.html"> Locale and traits
|
||||
@ -36,10 +37,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Algorithm Selection</title>
|
||||
<title>Algorithm Selection</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title=" Configuration">
|
||||
<link rel="prev" href="linkage.html" title=" Linkage Options">
|
||||
<link rel="next" href="tuning.html" title=" Algorithm Tuning">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="linkage.html" title="Linkage Options">
|
||||
<link rel="next" href="tuning.html" title="Algorithm Tuning">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.algorithm"></a><a href="algorithm.html" title=" Algorithm Selection"> Algorithm Selection</a></h3></div></div></div>
|
||||
<a name="boost_regex.configuration.algorithm"></a><a href="algorithm.html" title="Algorithm Selection"> Algorithm Selection</a>
|
||||
</h3></div></div></div>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -78,10 +79,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Compiler Setup</title>
|
||||
<title>Compiler Setup</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title=" Configuration">
|
||||
<link rel="prev" href="../configuration.html" title=" Configuration">
|
||||
<link rel="next" href="locale.html" title=" Locale and traits
|
||||
class selection">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="../configuration.html" title="Configuration">
|
||||
<link rel="next" href="locale.html" title="Locale and traits class selection">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.compiler"></a><a href="compiler.html" title=" Compiler Setup"> Compiler Setup</a></h3></div></div></div>
|
||||
<a name="boost_regex.configuration.compiler"></a><a href="compiler.html" title="Compiler Setup"> Compiler Setup</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
You shouldn't need to do anything special to configure Boost.Regex for use
|
||||
with your compiler - the <a href="../../../../../config/index.html" target="_top">Boost.Config
|
||||
@ -36,10 +36,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Linkage Options</title>
|
||||
<title>Linkage Options</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title=" Configuration">
|
||||
<link rel="prev" href="locale.html" title=" Locale and traits
|
||||
class selection">
|
||||
<link rel="next" href="algorithm.html" title=" Algorithm Selection">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="locale.html" title="Locale and traits class selection">
|
||||
<link rel="next" href="algorithm.html" title="Algorithm Selection">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.linkage"></a><a href="linkage.html" title=" Linkage Options"> Linkage Options</a></h3></div></div></div>
|
||||
<a name="boost_regex.configuration.linkage"></a><a href="linkage.html" title="Linkage Options"> Linkage Options</a>
|
||||
</h3></div></div></div>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -77,10 +77,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Locale and traits
|
||||
class selection</title>
|
||||
<title>Locale and traits class selection</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title=" Configuration">
|
||||
<link rel="prev" href="compiler.html" title=" Compiler Setup">
|
||||
<link rel="next" href="linkage.html" title=" Linkage Options">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="compiler.html" title="Compiler Setup">
|
||||
<link rel="next" href="linkage.html" title="Linkage Options">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.locale"></a><a href="locale.html" title=" Locale and traits
|
||||
class selection"> Locale and traits
|
||||
class selection</a></h3></div></div></div>
|
||||
<a name="boost_regex.configuration.locale"></a><a href="locale.html" title="Locale and traits class selection"> Locale and traits
|
||||
class selection</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The following macros (see <a href="../../../../../../boost/regex/user.hpp" target="_top">user.hpp</a>)
|
||||
control how Boost.Regex interacts with the user's locale:
|
||||
@ -96,10 +95,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Algorithm Tuning</title>
|
||||
<title>Algorithm Tuning</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../configuration.html" title=" Configuration">
|
||||
<link rel="prev" href="algorithm.html" title=" Algorithm Selection">
|
||||
<link rel="next" href="../install.html" title=" Building and Installing the Library">
|
||||
<link rel="up" href="../configuration.html" title="Configuration">
|
||||
<link rel="prev" href="algorithm.html" title="Algorithm Selection">
|
||||
<link rel="next" href="../install.html" title="Building and Installing the Library">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.configuration.tuning"></a><a href="tuning.html" title=" Algorithm Tuning"> Algorithm Tuning</a></h3></div></div></div>
|
||||
<a name="boost_regex.configuration.tuning"></a><a href="tuning.html" title="Algorithm Tuning"> Algorithm Tuning</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The following option applies only if BOOST_REGEX_RECURSIVE is set.
|
||||
</p>
|
||||
@ -139,10 +140,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Search and Replace Format String Syntax</title>
|
||||
<title>Search and Replace Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="syntax/leftmost_longest_rule.html" title=" The Leftmost
|
||||
Longest Rule">
|
||||
<link rel="next" href="format/sed_format.html" title=" Sed Format String Syntax">
|
||||
<link rel="prev" href="syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">
|
||||
<link rel="next" href="format/sed_format.html" title="Sed Format String Syntax">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.format"></a><a href="format.html" title=" Search and Replace Format String Syntax"> Search and Replace Format String Syntax</a></h2></div></div></div>
|
||||
<a name="boost_regex.format"></a><a href="format.html" title="Search and Replace Format String Syntax"> Search and Replace Format String Syntax</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="format/sed_format.html"> Sed Format String Syntax</a></span></dt>
|
||||
<dt><span class="section"><a href="format/perl_format.html"> Perl Format String Syntax</a></span></dt>
|
||||
@ -33,32 +33,26 @@
|
||||
Format String Syntax</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
Format strings are used by the algorithm <a href="ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> and by <a href="ref/match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></tt></a>, and are used to transform
|
||||
Format strings are used by the algorithm <a href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> and by <a href="ref/match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></code></a>, and are used to transform
|
||||
one string into another.
|
||||
</p>
|
||||
<p>
|
||||
There are three kind of format string: <a href="format/sed_format.html" title=" Sed Format String Syntax">Sed</a>,
|
||||
<a href="format/perl_format.html" title=" Perl Format String Syntax">Perl</a> and <a href="format/boost_format_syntax.html" title=" Boost-Extended
|
||||
Format String Syntax">Boost-Extended</a>.
|
||||
There are three kind of format string: <a href="format/sed_format.html" title="Sed Format String Syntax">Sed</a>,
|
||||
<a href="format/perl_format.html" title="Perl Format String Syntax">Perl</a> and <a href="format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">Boost-Extended</a>.
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, when the flag <tt class="computeroutput"><span class="identifier">format_literal</span></tt>
|
||||
Alternatively, when the flag <code class="computeroutput"><span class="identifier">format_literal</span></code>
|
||||
is passed to one of these functions, then the format string is treated as a
|
||||
string literal, and is copied unchanged to the output.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Boost-Extended
|
||||
Format String Syntax</title>
|
||||
<title>Boost-Extended Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../format.html" title=" Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="perl_format.html" title=" Perl Format String Syntax">
|
||||
<link rel="next" href="../ref.html" title=" Reference">
|
||||
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="perl_format.html" title="Perl Format String Syntax">
|
||||
<link rel="next" href="../ref.html" title="Reference">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,25 +24,25 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.format.boost_format_syntax"></a><a href="boost_format_syntax.html" title=" Boost-Extended
|
||||
Format String Syntax"> Boost-Extended
|
||||
Format String Syntax</a></h3></div></div></div>
|
||||
<a name="boost_regex.format.boost_format_syntax"></a><a href="boost_format_syntax.html" title="Boost-Extended Format String Syntax"> Boost-Extended
|
||||
Format String Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Boost-Extended format strings treat all characters as literals except for
|
||||
'$', '\', '(', ')', '?', and ':'.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h4>
|
||||
<a name="id481845"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.grouping"></a><h5>
|
||||
<a name="id525475"></a>
|
||||
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.grouping">Grouping</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The characters '(' and ')' perform lexical grouping, so use \( and \) if
|
||||
you want a to output literal parenthesis.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.conditionals"></a><h4>
|
||||
<a name="id481877"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.conditionals"></a><h5>
|
||||
<a name="id525505"></a>
|
||||
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.conditionals">Conditionals</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The character '?' begins a conditional expression, the general form is:
|
||||
</p>
|
||||
@ -66,11 +65,11 @@
|
||||
match found with "foo" if the sub-expression $1 was matched, and
|
||||
with "bar" otherwise.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h4>
|
||||
<a name="id481936"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.placeholder_sequences"></a><h5>
|
||||
<a name="id525562"></a>
|
||||
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.placeholder_sequences">Placeholder
|
||||
Sequences</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Placeholder sequences specify that some part of what matched the regular
|
||||
expression should be sent to output as follows:
|
||||
@ -161,11 +160,11 @@
|
||||
Any $-placeholder sequence not listed above, results in '$' being treated
|
||||
as a literal.
|
||||
</p>
|
||||
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h4>
|
||||
<a name="id482109"></a>
|
||||
<a name="boost_regex.format.boost_format_syntax.escape_sequences"></a><h5>
|
||||
<a name="id525734"></a>
|
||||
<a href="boost_format_syntax.html#boost_regex.format.boost_format_syntax.escape_sequences">Escape
|
||||
Sequences</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
An escape character followed by any character x, outputs that character unless
|
||||
x is one of the escape sequences shown below.
|
||||
@ -390,10 +389,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Perl Format String Syntax</title>
|
||||
<title>Perl Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../format.html" title=" Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="sed_format.html" title=" Sed Format String Syntax">
|
||||
<link rel="next" href="boost_format_syntax.html" title=" Boost-Extended
|
||||
Format String Syntax">
|
||||
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="sed_format.html" title="Sed Format String Syntax">
|
||||
<link rel="next" href="boost_format_syntax.html" title="Boost-Extended Format String Syntax">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.format.perl_format"></a><a href="perl_format.html" title=" Perl Format String Syntax"> Perl Format String Syntax</a></h3></div></div></div>
|
||||
<a name="boost_regex.format.perl_format"></a><a href="perl_format.html" title="Perl Format String Syntax"> Perl Format String Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Perl-style format strings treat all characters as literals except '$' and
|
||||
'\' which start placeholder and escape sequences respectively.
|
||||
@ -344,10 +344,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Sed Format String Syntax</title>
|
||||
<title>Sed Format String Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../format.html" title=" Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="../format.html" title=" Search and Replace Format String Syntax">
|
||||
<link rel="next" href="perl_format.html" title=" Perl Format String Syntax">
|
||||
<link rel="up" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="prev" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
<link rel="next" href="perl_format.html" title="Perl Format String Syntax">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.format.sed_format"></a><a href="sed_format.html" title=" Sed Format String Syntax"> Sed Format String Syntax</a></h3></div></div></div>
|
||||
<a name="boost_regex.format.sed_format"></a><a href="sed_format.html" title="Sed Format String Syntax"> Sed Format String Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Sed-style format strings treat all characters as literals except:
|
||||
</p>
|
||||
@ -234,10 +235,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Building and Installing the Library</title>
|
||||
<title>Building and Installing the Library</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="configuration/tuning.html" title=" Algorithm Tuning">
|
||||
<link rel="next" href="introduction_and_overview.html" title="Introduction and
|
||||
Overview">
|
||||
<link rel="prev" href="configuration/tuning.html" title="Algorithm Tuning">
|
||||
<link rel="next" href="introduction_and_overview.html" title="Introduction and Overview">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.install"></a><a href="install.html" title=" Building and Installing the Library"> Building and Installing the Library</a></h2></div></div></div>
|
||||
<a name="boost_regex.install"></a><a href="install.html" title="Building and Installing the Library"> Building and Installing the Library</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
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
|
||||
@ -48,20 +48,20 @@
|
||||
it is necessary to build the library's support code into a library or archive
|
||||
file before you can use it, instructions for specific platforms are as follows:
|
||||
</p>
|
||||
<a name="boost_regex.install.building_with_bjam"></a><h4>
|
||||
<a name="id386451"></a>
|
||||
<a name="boost_regex.install.building_with_bjam"></a><h5>
|
||||
<a name="id446088"></a>
|
||||
<a href="install.html#boost_regex.install.building_with_bjam">Building with bjam</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
This is now the preferred method for building and installing this library,
|
||||
please refer to the <a href="../../../../../more/getting_started.html" target="_top">getting
|
||||
started guide</a> for more information.
|
||||
</p>
|
||||
<a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h4>
|
||||
<a name="id386488"></a>
|
||||
<a name="boost_regex.install.building_with_unicode_and_icu_support"></a><h5>
|
||||
<a name="id447706"></a>
|
||||
<a href="install.html#boost_regex.install.building_with_unicode_and_icu_support">Building
|
||||
With Unicode and ICU Support</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
A default build of this library does not enable Unciode support via ICU. There
|
||||
is no need to enable this support if you don't need it, but if you use ICU
|
||||
@ -75,16 +75,16 @@
|
||||
</p>
|
||||
<p>
|
||||
If you're building on a Unix-like platform, and ICU is already installed in
|
||||
your compilers search path (with an install prefix of <tt class="computeroutput"><span class="special">/</span><span class="identifier">usr</span></tt> or <tt class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span></tt>
|
||||
for example), then set the environment variable <tt class="computeroutput"><span class="identifier">HAVE_ICU</span></tt>
|
||||
your compilers search path (with an install prefix of <code class="computeroutput"><span class="special">/</span><span class="identifier">usr</span></code> or <code class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span></code>
|
||||
for example), then set the environment variable <code class="computeroutput"><span class="identifier">HAVE_ICU</span></code>
|
||||
to enable ICU support. For example you might build with the command line:
|
||||
</p>
|
||||
<pre class="programlisting">bjam -sHAVE_ICU=1 --toolset=toolset-name install</pre>
|
||||
<p>
|
||||
If ICU is not already in your compiler's path then you need to set the environment
|
||||
variable <tt class="computeroutput"><span class="identifier">ICU_PATH</span></tt> to point
|
||||
variable <code class="computeroutput"><span class="identifier">ICU_PATH</span></code> to point
|
||||
to the root directory of your ICU installation, for example if ICU was installed
|
||||
to <tt class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">icu</span><span class="special">/</span><span class="number">3.3</span></tt>
|
||||
to <code class="computeroutput"><span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">icu</span><span class="special">/</span><span class="number">3.3</span></code>
|
||||
you might use:
|
||||
</p>
|
||||
<pre class="programlisting">bjam -sICU_PATH=/usr/local/icu/3.3 --toolset=toolset-name install</pre>
|
||||
@ -95,17 +95,17 @@
|
||||
ensure that this is the case: it is up to you to ensure that the version of
|
||||
ICU you are using is binary compatible with the toolset you use to build Boost.
|
||||
</p>
|
||||
<a name="boost_regex.install.building_via_makefiles"></a><h4>
|
||||
<a name="id385474"></a>
|
||||
<a name="boost_regex.install.building_via_makefiles"></a><h5>
|
||||
<a name="id445600"></a>
|
||||
<a href="install.html#boost_regex.install.building_via_makefiles">Building via makefiles</a>
|
||||
</h4>
|
||||
<a name="boost_regex.install.borland_c___builder_"></a><h5>
|
||||
<a name="id385498"></a>
|
||||
<a href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
|
||||
</h5>
|
||||
<a name="boost_regex.install.borland_c___builder_"></a><h6>
|
||||
<a name="id445624"></a>
|
||||
<a href="install.html#boost_regex.install.borland_c___builder_">Borland C++ Builder:</a>
|
||||
</h6>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Open up a console window and change to the <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span></tt>
|
||||
Open up a console window and change to the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span></code>
|
||||
directory.
|
||||
</li>
|
||||
<li>
|
||||
@ -127,7 +127,7 @@
|
||||
</p>
|
||||
<pre class="programlisting">make -fbcb5.mak install</pre>
|
||||
<p>
|
||||
library files will be copied to <tt class="computeroutput"><span class="special"><</span><span class="identifier">BCROOT</span><span class="special">>/</span><span class="identifier">lib</span></tt> and the dll's to <tt class="computeroutput"><span class="special"><</span><span class="identifier">BCROOT</span><span class="special">>/</span><span class="identifier">bin</span></tt>, where <tt class="computeroutput"><span class="special"><</span><span class="identifier">BCROOT</span><span class="special">></span></tt>
|
||||
library files will be copied to <code class="computeroutput"><span class="special"><</span><span class="identifier">BCROOT</span><span class="special">>/</span><span class="identifier">lib</span></code> and the dll's to <code class="computeroutput"><span class="special"><</span><span class="identifier">BCROOT</span><span class="special">>/</span><span class="identifier">bin</span></code>, where <code class="computeroutput"><span class="special"><</span><span class="identifier">BCROOT</span><span class="special">></span></code>
|
||||
corresponds to the install path of your Borland C++ tools.
|
||||
</p>
|
||||
<p>
|
||||
@ -136,7 +136,7 @@
|
||||
</p>
|
||||
<pre class="programlisting">make -fbcb5.mak clean</pre>
|
||||
<p>
|
||||
Finally when you use Boost.Regex it is only necessary for you to add the <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">></span></tt> root director to your list of include directories
|
||||
Finally when you use Boost.Regex it is only necessary for you to add the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">></span></code> root director to your list of include directories
|
||||
for that project. It is not necessary for you to manually add a .lib file to
|
||||
the project; the headers will automatically select the correct .lib file for
|
||||
your build mode and tell the linker to include it. There is one caveat however:
|
||||
@ -159,17 +159,17 @@
|
||||
build of the lib) then define BOOST_REGEX_NO_LIB.
|
||||
</p>
|
||||
<p>
|
||||
If you are building with C++ Builder 6, you will find that <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
can not be used in a pre-compiled header (the actual problem is in <tt class="computeroutput"><span class="special"><</span><span class="identifier">locale</span><span class="special">></span></tt> which gets included by <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>),
|
||||
If you are building with C++ Builder 6, you will find that <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
can not be used in a pre-compiled header (the actual problem is in <code class="computeroutput"><span class="special"><</span><span class="identifier">locale</span><span class="special">></span></code> which gets included by <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>),
|
||||
if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when
|
||||
building, this will disable some features throughout boost, but may save you
|
||||
a lot in compile times!
|
||||
</p>
|
||||
<a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h4>
|
||||
<a name="id456273"></a>
|
||||
<a name="boost_regex.install.microsoft_visual_c___6__7__7_1_and_8"></a><h5>
|
||||
<a name="id500138"></a>
|
||||
<a href="install.html#boost_regex.install.microsoft_visual_c___6__7__7_1_and_8">Microsoft
|
||||
Visual C++ 6, 7, 7.1 and 8</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
You need version 6 or later of MSVC to build this library. If you are using
|
||||
VC5 then you may want to look at one of the previous releases of this library.
|
||||
@ -177,7 +177,7 @@
|
||||
<p>
|
||||
Open up a command prompt, which has the necessary MSVC environment variables
|
||||
defined (for example by using the batch file Vcvars32.bat installed by the
|
||||
Visual Studio installation), and change to the <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span> <span class="identifier">directory</span></tt>.
|
||||
Visual Studio installation), and change to the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">regex</span><span class="special">\</span><span class="identifier">build</span> <span class="identifier">directory</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6
|
||||
@ -193,7 +193,7 @@
|
||||
</p>
|
||||
<pre class="programlisting">nmake -fvc6.mak install</pre>
|
||||
<p>
|
||||
The lib files will be copied to your <tt class="computeroutput"><span class="special"><</span><span class="identifier">VC6</span><span class="special">>\</span><span class="identifier">lib</span></tt> directory and the dll files to <tt class="computeroutput"><span class="special"><</span><span class="identifier">VC6</span><span class="special">>\</span><span class="identifier">bin</span></tt>, where <tt class="computeroutput"><span class="special"><</span><span class="identifier">VC6</span><span class="special">></span></tt> is
|
||||
The lib files will be copied to your <code class="computeroutput"><span class="special"><</span><span class="identifier">VC6</span><span class="special">>\</span><span class="identifier">lib</span></code> directory and the dll files to <code class="computeroutput"><span class="special"><</span><span class="identifier">VC6</span><span class="special">>\</span><span class="identifier">bin</span></code>, where <code class="computeroutput"><span class="special"><</span><span class="identifier">VC6</span><span class="special">></span></code> is
|
||||
the root of your Visual C++ 6 installation.
|
||||
</p>
|
||||
<p>
|
||||
@ -207,7 +207,7 @@
|
||||
</p>
|
||||
<pre class="programlisting">nmake ICU_PATH=c:\open-source\icu -fvc71.mak install</pre>
|
||||
<p>
|
||||
Finally when you use Boost.Regex it is only necessary for you to add the <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">></span></tt> root directory to your list of include
|
||||
Finally when you use Boost.Regex it is only necessary for you to add the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">></span></code> root directory to your list of include
|
||||
directories for that project. It is not necessary for you to manually add a
|
||||
.lib file to the project; the headers will automatically select the correct
|
||||
.lib file for your build mode and tell the linker to include it.
|
||||
@ -252,12 +252,12 @@
|
||||
to modify the makefile to add /Zc:wchar_t before building the library.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h5>
|
||||
<a name="id456584"></a>
|
||||
<a name="boost_regex.install.gcc_2_95_and_later_"></a><h6>
|
||||
<a name="id500450"></a>
|
||||
<a href="install.html#boost_regex.install.gcc_2_95_and_later_">GCC(2.95 and later)</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
You can build with gcc using the normal boost Jamfile in <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></tt>, alternatively
|
||||
You can build with gcc using the normal boost Jamfile in <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code>, alternatively
|
||||
there is a conservative makefile for the g++ compiler. From the command prompt
|
||||
change to the <boost>/libs/regex/build directory and type:
|
||||
</p>
|
||||
@ -298,16 +298,16 @@
|
||||
LIBS: additional library files.
|
||||
</p>
|
||||
<p>
|
||||
For the more adventurous there is a configure script in <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span></tt>;
|
||||
For the more adventurous there is a configure script in <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span></code>;
|
||||
see the <a href="../../../../config/index.html" target="_top">config library documentation</a>.
|
||||
</p>
|
||||
<a name="boost_regex.install.sun_workshop_6_1"></a><h5>
|
||||
<a name="id456781"></a>
|
||||
<a name="boost_regex.install.sun_workshop_6_1"></a><h6>
|
||||
<a name="id500651"></a>
|
||||
<a href="install.html#boost_regex.install.sun_workshop_6_1">Sun Workshop 6.1</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the
|
||||
command prompt change to the <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></tt> directory
|
||||
command prompt change to the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code> directory
|
||||
and type:
|
||||
</p>
|
||||
<pre class="programlisting">dmake -f sunpro.mak </pre>
|
||||
@ -316,7 +316,7 @@
|
||||
single and multithread versions of the library (libboost_regex.a, libboost_regex.so,
|
||||
libboost_regex_mt.a and libboost_regex_mt.so). When you build projects that
|
||||
use Boost.Regex, you will need to add the boost install directory to your list
|
||||
of include paths and add <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">sunpro</span><span class="special">/</span></tt> to
|
||||
of include paths and add <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">sunpro</span><span class="special">/</span></code> to
|
||||
your library search path.
|
||||
</p>
|
||||
<p>
|
||||
@ -342,26 +342,27 @@
|
||||
This makefile does not set any architecture specific options like -xarch=v9,
|
||||
you can set these by defining the appropriate macros, for example:
|
||||
</p>
|
||||
<pre class="programlisting">dmake CXXFLAGS="-xarch<tt class="literal">v9" LDFLAGS</tt>"-xarch<tt class="literal">v9" LIBSUFFIX</tt>"_v9" -f sunpro.mak</pre>
|
||||
<pre class="programlisting">dmake CXXFLAGS="-xarch<code class="literal">v9" LDFLAGS</code>"-xarch<code class="literal">v9" LIBSUFFIX</code>"_v9" -f sunpro.mak</pre>
|
||||
<p>
|
||||
will build v9 variants of the regex library named libboost_regex_v9.a etc.
|
||||
</p>
|
||||
<a name="boost_regex.install.makefiles_for_other_compilers"></a><h5>
|
||||
<a name="id457001"></a>
|
||||
<a name="boost_regex.install.makefiles_for_other_compilers"></a><h6>
|
||||
<a name="id500873"></a>
|
||||
<a href="install.html#boost_regex.install.makefiles_for_other_compilers">Makefiles
|
||||
for Other compilers</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
There is a generic makefile (generic.mak ) provided in <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></tt> - see that makefile for details of
|
||||
There is a generic makefile (generic.mak ) provided in <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">>/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">build</span></code> - see that makefile for details of
|
||||
environment variables that need to be set before use.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Introduction and
|
||||
Overview</title>
|
||||
<title>Introduction and Overview</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="install.html" title=" Building and Installing the Library">
|
||||
<link rel="next" href="unicode.html" title=" Unicode and Boost.Regex">
|
||||
<link rel="prev" href="install.html" title="Building and Installing the Library">
|
||||
<link rel="next" href="unicode.html" title="Unicode and Boost.Regex">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.introduction_and_overview"></a><a href="introduction_and_overview.html" title="Introduction and
|
||||
Overview">Introduction and
|
||||
Overview</a></h2></div></div></div>
|
||||
<a name="boost_regex.introduction_and_overview"></a><a href="introduction_and_overview.html" title="Introduction and Overview">Introduction and
|
||||
Overview</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
Regular expressions are a form of pattern-matching that are often used in text
|
||||
processing; many users will be familiar with the Unix utilities grep, sed and
|
||||
@ -40,16 +39,15 @@
|
||||
libraries can not do.
|
||||
</p>
|
||||
<p>
|
||||
The class <a href="ref/basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>
|
||||
The class <a href="ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
|
||||
is the key class in this library; it represents a "machine readable"
|
||||
regular expression, and is very closely modeled on <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>,
|
||||
regular expression, and is very closely modeled on <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>,
|
||||
think of it as a string plus the actual state-machine required by the regular
|
||||
expression algorithms. Like <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>
|
||||
expression algorithms. Like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>
|
||||
there are two typedefs that are almost always the means by which this class
|
||||
is referenced:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="special">></span>
|
||||
@ -87,8 +85,7 @@
|
||||
Now let's take that expression and place it in some C++ code to validate the
|
||||
format of a credit card number:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">bool</span> <span class="identifier">validate_card_format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">validate_card_format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"(\\d{4}[- ]){3}\\d{4}"</span><span class="special">);</span>
|
||||
<span class="keyword">return</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">e</span><span class="special">);</span>
|
||||
@ -100,7 +97,7 @@
|
||||
regular expression engine, consequently escapes in regular expressions have
|
||||
to be doubled up when embedding them in C/C++ code. Also note that all the
|
||||
examples assume that your compiler supports argument-dependent-lookup lookup,
|
||||
if yours doesn't (for example VC6), then you will have to add some <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span></tt> prefixes
|
||||
if yours doesn't (for example VC6), then you will have to add some <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span></code> prefixes
|
||||
to some of the function calls in the examples.
|
||||
</p>
|
||||
<p>
|
||||
@ -113,11 +110,10 @@
|
||||
the utilities sed and Perl will already be ahead here; we need two strings
|
||||
- one a regular expression - the other a "format string" that provides
|
||||
a description of the text to replace the match with. In Boost.Regex this search
|
||||
and replace operation is performed with the algorithm <a href="ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>, for our credit card
|
||||
and replace operation is performed with the algorithm <a href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>, for our credit card
|
||||
example we can write two algorithms like this to provide the format conversions:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">// match any format with the regular expression:
|
||||
<pre class="programlisting"><span class="comment">// match any format with the regular expression:
|
||||
</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"</span><span class="special">);</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">machine_format</span><span class="special">(</span><span class="string">"\\1\\2\\3\\4"</span><span class="special">);</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">human_format</span><span class="special">(</span><span class="string">"\\1-\\2-\\3-\\4"</span><span class="special">);</span>
|
||||
@ -142,11 +138,10 @@
|
||||
expression match, however in general the result of a match contains a number
|
||||
of sub-expression matches in addition to the overall match. When the library
|
||||
needs to report a regular expression match it does so using an instance of
|
||||
the class <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>,
|
||||
the class <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>,
|
||||
as before there are typedefs of this class for the most common cases:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span> <span class="identifier">cmatch</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*></span> <span class="identifier">wcmatch</span><span class="special">;</span>
|
||||
@ -156,12 +151,12 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
The algorithms <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>
|
||||
and <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>
|
||||
make use of <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>
|
||||
to report what matched; the difference between these algorithms is that <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>
|
||||
The algorithms <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
|
||||
and <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
|
||||
make use of <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
|
||||
to report what matched; the difference between these algorithms is that <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
|
||||
will only find matches that consume <span class="emphasis"><em>all</em></span> of the input text,
|
||||
where as <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>
|
||||
where as <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
|
||||
will search for a match anywhere within the text being matched.
|
||||
</p>
|
||||
<p>
|
||||
@ -170,22 +165,21 @@
|
||||
of seamlessly searching almost any kind of data.
|
||||
</p>
|
||||
<p>
|
||||
For search and replace operations, in addition to the algorithm <a href="ref/regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> that we have already
|
||||
seen, the <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>
|
||||
class has a <tt class="computeroutput"><span class="identifier">format</span></tt> member that
|
||||
For search and replace operations, in addition to the algorithm <a href="ref/regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> that we have already
|
||||
seen, the <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
|
||||
class has a <code class="computeroutput"><span class="identifier">format</span></code> member that
|
||||
takes the result of a match and a format string, and produces a new string
|
||||
by merging the two.
|
||||
</p>
|
||||
<p>
|
||||
For iterating through all occurences of an expression within a text, there
|
||||
are two iterator types: <a href="ref/regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> will enumerate over
|
||||
the <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>
|
||||
objects found, while <a href="ref/regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> will enumerate
|
||||
are two iterator types: <a href="ref/regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> will enumerate over
|
||||
the <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
|
||||
objects found, while <a href="ref/regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> will enumerate
|
||||
a series of strings (similar to perl style split operations).
|
||||
</p>
|
||||
<p>
|
||||
For those that dislike templates, there is a high level wrapper class <a href="ref/deprecated_interfaces/old_regex.html" title=" High
|
||||
Level Class RegEx (Deprecated)"><tt class="computeroutput"><span class="identifier">RegEx</span></tt></a>
|
||||
For those that dislike templates, there is a high level wrapper class <a href="ref/deprecated_interfaces/old_regex.html" title="High Level Class RegEx (Deprecated)"><code class="computeroutput"><span class="identifier">RegEx</span></code></a>
|
||||
that is an encapsulation of the lower level template code - it provides a simplified
|
||||
interface for those that don't need the full power of the library, and supports
|
||||
only narrow characters, and the "extended" regular expression syntax.
|
||||
@ -193,12 +187,12 @@
|
||||
C++ standard library proposal.
|
||||
</p>
|
||||
<p>
|
||||
The POSIX API functions: <a href="ref/posix.html#boost_regex.ref.posix.regcomp"><tt class="computeroutput"><span class="identifier">regcomp</span></tt></a>, <a href="ref/posix.html#boost_regex.ref.posix.regexec"><tt class="computeroutput"><span class="identifier">regexec</span></tt></a>, <a href="ref/posix.html#boost_regex.ref.posix.regfree"><tt class="computeroutput"><span class="identifier">regfree</span></tt></a> and [regerr], are available
|
||||
The POSIX API functions: <a href="ref/posix.html#boost_regex.ref.posix.regcomp"><code class="computeroutput"><span class="identifier">regcomp</span></code></a>, <a href="ref/posix.html#boost_regex.ref.posix.regexec"><code class="computeroutput"><span class="identifier">regexec</span></code></a>, <a href="ref/posix.html#boost_regex.ref.posix.regfree"><code class="computeroutput"><span class="identifier">regfree</span></code></a> and [regerr], are available
|
||||
in both narrow character and Unicode versions, and are provided for those who
|
||||
need compatibility with these API's.
|
||||
</p>
|
||||
<p>
|
||||
Finally, note that the library now has <a href="background_information/locale.html" title=" Localization">run-time
|
||||
Finally, note that the library now has <a href="background_information/locale.html" title="Localization">run-time
|
||||
localization support</a>, and recognizes the full POSIX regular expression
|
||||
syntax - including advanced features like multi-character collating elements
|
||||
and equivalence classes - as well as providing compatibility with other regular
|
||||
@ -207,10 +201,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Partial Matches</title>
|
||||
<title>Partial Matches</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="captures.html" title=" Understanding Marked Sub-Expressions
|
||||
and Captures">
|
||||
<link rel="next" href="syntax.html" title=" Regular Expression Syntax">
|
||||
<link rel="prev" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">
|
||||
<link rel="next" href="syntax.html" title="Regular Expression Syntax">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,13 +24,13 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.partial_matches"></a><a href="partial_matches.html" title=" Partial Matches"> Partial Matches</a></h2></div></div></div>
|
||||
<a name="boost_regex.partial_matches"></a><a href="partial_matches.html" title="Partial Matches"> Partial Matches</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
The <a href="ref/match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>
|
||||
<tt class="computeroutput"><span class="identifier">match_partial</span></tt> can be passed
|
||||
to the following algorithms: <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, and <a href="ref/deprecated_interfaces/regex_grep.html" title="
|
||||
regex_grep (Deprecated)"><tt class="computeroutput"><span class="identifier">regex_grep</span></tt></a>, and used with the iterator
|
||||
<a href="ref/regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>.
|
||||
The <a href="ref/match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>
|
||||
<code class="computeroutput"><span class="identifier">match_partial</span></code> can be passed
|
||||
to the following algorithms: <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, <a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, and <a href="ref/deprecated_interfaces/regex_grep.html" title="regex_grep (Deprecated)"><code class="computeroutput"><span class="identifier">regex_grep</span></code></a>, and used with the iterator
|
||||
<a href="ref/regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>.
|
||||
When used it indicates that partial as well as full matches should be found.
|
||||
A partial match is one that matched one or more characters at the end of the
|
||||
text input, but did not match all of the regular expression (although it may
|
||||
@ -41,10 +40,9 @@
|
||||
into memory (or even into a memory mapped file), or are of indeterminate length
|
||||
(for example the source may be a socket or similar). Partial and full matches
|
||||
can be differentiated as shown in the following table (the variable M represents
|
||||
an instance of <a href="ref/match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> as filled in by <a href="ref/regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>,
|
||||
<a href="ref/regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>
|
||||
or <a href="ref/deprecated_interfaces/regex_grep.html" title="
|
||||
regex_grep (Deprecated)"><tt class="computeroutput"><span class="identifier">regex_grep</span></tt></a>):
|
||||
an instance of <a href="ref/match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> as filled in by <a href="ref/regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>,
|
||||
<a href="ref/regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
|
||||
or <a href="ref/deprecated_interfaces/regex_grep.html" title="regex_grep (Deprecated)"><code class="computeroutput"><span class="identifier">regex_grep</span></code></a>):
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
@ -186,7 +184,7 @@
|
||||
<p>
|
||||
The following example tests to see whether the text could be a valid credit
|
||||
card number, as the user presses a key, the character entered would be added
|
||||
to the string being built up, and passed to <tt class="computeroutput"><span class="identifier">is_possible_card_number</span></tt>.
|
||||
to the string being built up, and passed to <code class="computeroutput"><span class="identifier">is_possible_card_number</span></code>.
|
||||
If this returns true then the text could be a valid card number, so the user
|
||||
interface's OK button would be enabled. If it returns false, then this is not
|
||||
yet a valid card number, but could be with more input, so the user interface
|
||||
@ -194,8 +192,7 @@
|
||||
the input could never become a valid number, and the inputted character must
|
||||
be discarded, and a suitable error indication displayed to the user.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
|
||||
@ -230,8 +227,7 @@
|
||||
if a partial match was encountered, then the partial match gets searched a
|
||||
second time as the start of the next batch of text:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">sstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
@ -297,10 +293,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Reference</title>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="format/boost_format_syntax.html" title=" Boost-Extended
|
||||
Format String Syntax">
|
||||
<link rel="next" href="ref/basic_regex.html" title=" basic_regex">
|
||||
<link rel="prev" href="format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">
|
||||
<link rel="next" href="ref/basic_regex.html" title="basic_regex">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.ref"></a><a href="ref.html" title=" Reference"> Reference</a></h2></div></div></div>
|
||||
<a name="boost_regex.ref"></a><a href="ref.html" title="Reference"> Reference</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="ref/basic_regex.html"> basic_regex</a></span></dt>
|
||||
<dt><span class="section"><a href="ref/match_results.html"> match_results</a></span></dt>
|
||||
@ -91,7 +91,7 @@
|
||||
<dt><span class="section"><a href="ref/concepts/traits_concept.html"> Traits Class
|
||||
Requirements</a></span></dt>
|
||||
<dt><span class="section"><a href="ref/concepts/iterator_concepts.html"> Iterator
|
||||
Rrequirements</a></span></dt>
|
||||
Requirements</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="ref/deprecated_interfaces.html">Deprecated Interfaces</a></span></dt>
|
||||
<dd><dl>
|
||||
@ -105,35 +105,14 @@
|
||||
Level Class RegEx (Deprecated)</a></span></dt>
|
||||
</dl></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> bad_expression</title>
|
||||
<title>bad_expression</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="regex_token_iterator.html" title=" regex_token_iterator">
|
||||
<link rel="next" href="syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_token_iterator.html" title="regex_token_iterator">
|
||||
<link rel="next" href="syntax_option_type.html" title="syntax_option_type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,21 +24,20 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.bad_expression"></a><a href="bad_expression.html" title=" bad_expression"> bad_expression</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.bad_expression.synopsis"></a><h4>
|
||||
<a name="id563003"></a>
|
||||
<a name="boost_regex.ref.bad_expression"></a><a href="bad_expression.html" title="bad_expression"> bad_expression</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.ref.bad_expression.synopsis"></a><h5>
|
||||
<a name="id606153"></a>
|
||||
<a href="bad_expression.html#boost_regex.ref.bad_expression.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pattern_except</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The class <tt class="computeroutput"><span class="identifier">regex_error</span></tt> defines
|
||||
The class <code class="computeroutput"><span class="identifier">regex_error</span></code> 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.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">class</span> <span class="identifier">regex_error</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span>
|
||||
<span class="special">{</span>
|
||||
@ -54,49 +53,47 @@
|
||||
</span>
|
||||
<span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<a name="boost_regex.ref.bad_expression.description"></a><h4>
|
||||
<a name="id563510"></a>
|
||||
<a name="boost_regex.ref.bad_expression.description"></a><h5>
|
||||
<a name="id606656"></a>
|
||||
<a href="bad_expression.html#boost_regex.ref.bad_expression.description">Description</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="identifier">regex_error</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">pos</span><span class="special">);</span>
|
||||
<span class="identifier">regex_error</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">err</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects:</b></span> Constructs an object of class regex_error.
|
||||
<span class="bold"><strong>Effects:</strong></span> Constructs an object of class regex_error.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">code</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">error_type</span> <span class="identifier">code</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects:</b></span> returns the error code that represents
|
||||
<span class="bold"><strong>Effects:</strong></span> returns the error code that represents
|
||||
parsing error that occurred.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">position</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">position</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects:</b></span> returns the location in the expression
|
||||
<span class="bold"><strong>Effects:</strong></span> returns the location in the expression
|
||||
where parsing stopped.
|
||||
</p>
|
||||
<p>
|
||||
Footnotes: the choice of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
as the base class for <tt class="computeroutput"><span class="identifier">regex_error</span></tt>
|
||||
Footnotes: the choice of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
as the base class for <code class="computeroutput"><span class="identifier">regex_error</span></code>
|
||||
is moot; depending upon how the library is used exceptions may be either
|
||||
logic errors (programmer supplied expressions) or run time errors (user supplied
|
||||
expressions). The library previously used <tt class="computeroutput"><span class="identifier">bad_pattern</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">bad_expression</span></tt> for errors,
|
||||
these have been replaced by the single class <tt class="computeroutput"><span class="identifier">regex_error</span></tt>
|
||||
expressions). The library previously used <code class="computeroutput"><span class="identifier">bad_pattern</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">bad_expression</span></code> for errors,
|
||||
these have been replaced by the single class <code class="computeroutput"><span class="identifier">regex_error</span></code>
|
||||
to keep the library in synchronization with the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
|
||||
Report on C++ Library Extensions</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Concepts</title>
|
||||
<title>Concepts</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="posix.html" title=" POSIX Compatible C API's">
|
||||
<link rel="next" href="concepts/charT_concept.html" title=" charT Requirements">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="posix.html" title="POSIX Compatible C API's">
|
||||
<link rel="next" href="concepts/charT_concept.html" title="charT Requirements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,21 +24,23 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.concepts"></a><a href="concepts.html" title=" Concepts"> Concepts</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.concepts"></a><a href="concepts.html" title="Concepts"> Concepts</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="concepts/charT_concept.html"> charT Requirements</a></span></dt>
|
||||
<dt><span class="section"><a href="concepts/traits_concept.html"> Traits Class
|
||||
Requirements</a></span></dt>
|
||||
<dt><span class="section"><a href="concepts/iterator_concepts.html"> Iterator
|
||||
Rrequirements</a></span></dt>
|
||||
Requirements</a></span></dt>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> charT Requirements</title>
|
||||
<title>charT Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../concepts.html" title=" Concepts">
|
||||
<link rel="prev" href="../concepts.html" title=" Concepts">
|
||||
<link rel="next" href="traits_concept.html" title=" Traits Class
|
||||
Requirements">
|
||||
<link rel="up" href="../concepts.html" title="Concepts">
|
||||
<link rel="prev" href="../concepts.html" title="Concepts">
|
||||
<link rel="next" href="traits_concept.html" title="Traits Class Requirements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,16 +24,17 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.concepts.charT_concept"></a><a href="charT_concept.html" title=" charT Requirements"> charT Requirements</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.concepts.charT_concept"></a><a href="charT_concept.html" title="charT Requirements"> charT Requirements</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
Type <tt class="computeroutput"><span class="identifier">charT</span></tt> used a template
|
||||
argument to class template <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>, must have a trivial
|
||||
Type <code class="computeroutput"><span class="identifier">charT</span></code> used a template
|
||||
argument to class template <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>, must have a trivial
|
||||
default constructor, copy constructor, assignment operator, and destructor.
|
||||
In addition the following requirements must be met for objects; <span class="emphasis"><em>c</em></span>
|
||||
of type <tt class="computeroutput"><span class="identifier">charT</span></tt>, <span class="emphasis"><em>c1</em></span>
|
||||
and <span class="emphasis"><em>c2</em></span> of type <tt class="computeroutput"><span class="identifier">charT</span>
|
||||
<span class="keyword">const</span></tt>, and <span class="emphasis"><em>i</em></span>
|
||||
of type <tt class="computeroutput"><span class="keyword">int</span></tt>:
|
||||
of type <code class="computeroutput"><span class="identifier">charT</span></code>, <span class="emphasis"><em>c1</em></span>
|
||||
and <span class="emphasis"><em>c2</em></span> of type <code class="computeroutput"><span class="identifier">charT</span>
|
||||
<span class="keyword">const</span></code>, and <span class="emphasis"><em>i</em></span>
|
||||
of type <code class="computeroutput"><span class="keyword">int</span></code>:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
@ -258,10 +258,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Iterator
|
||||
Rrequirements</title>
|
||||
<title>Iterator Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../concepts.html" title=" Concepts">
|
||||
<link rel="prev" href="traits_concept.html" title=" Traits Class
|
||||
Requirements">
|
||||
<link rel="up" href="../concepts.html" title="Concepts">
|
||||
<link rel="prev" href="traits_concept.html" title="Traits Class Requirements">
|
||||
<link rel="next" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,19 +24,20 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.concepts.iterator_concepts"></a><a href="iterator_concepts.html" title=" Iterator
|
||||
Rrequirements"> Iterator
|
||||
Rrequirements</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.concepts.iterator_concepts"></a><a href="iterator_concepts.html" title="Iterator Requirements"> Iterator
|
||||
Requirements</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The regular expression algorithms (and iterators) take all require a Bidirectional-Iterator.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Traits Class
|
||||
Requirements</title>
|
||||
<title>Traits Class Requirements</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../concepts.html" title=" Concepts">
|
||||
<link rel="prev" href="charT_concept.html" title=" charT Requirements">
|
||||
<link rel="next" href="iterator_concepts.html" title=" Iterator
|
||||
Rrequirements">
|
||||
<link rel="up" href="../concepts.html" title="Concepts">
|
||||
<link rel="prev" href="charT_concept.html" title="charT Requirements">
|
||||
<link rel="next" href="iterator_concepts.html" title="Iterator Requirements">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,37 +24,37 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.concepts.traits_concept"></a><a href="traits_concept.html" title=" Traits Class
|
||||
Requirements"> Traits Class
|
||||
Requirements</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.concepts.traits_concept"></a><a href="traits_concept.html" title="Traits Class Requirements"> Traits Class
|
||||
Requirements</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
There are two sets of requirements for the <tt class="computeroutput"><span class="identifier">traits</span></tt>
|
||||
template argument to <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>: a mininal interface
|
||||
There are two sets of requirements for the <code class="computeroutput"><span class="identifier">traits</span></code>
|
||||
template argument to <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>: a mininal interface
|
||||
(which is part of the regex standardization proposal), and an optional
|
||||
Boost-specific enhanced interface.
|
||||
</p>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h4>
|
||||
<a name="id589905"></a>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.minimal_requirements_"></a><h5>
|
||||
<a name="id632754"></a>
|
||||
<a href="traits_concept.html#boost_regex.ref.concepts.traits_concept.minimal_requirements_">Minimal
|
||||
requirements.</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
In the following table <tt class="computeroutput"><span class="identifier">X</span></tt>
|
||||
In the following table <code class="computeroutput"><span class="identifier">X</span></code>
|
||||
denotes a traits class defining types and functions for the character container
|
||||
type <tt class="computeroutput"><span class="identifier">charT</span></tt>; <span class="emphasis"><em>u</em></span>
|
||||
is an object of type <tt class="computeroutput"><span class="identifier">X</span></tt>;
|
||||
<span class="emphasis"><em>v</em></span> is an object of type <tt class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">X</span></tt>; <span class="emphasis"><em>p</em></span> is
|
||||
a value of type <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></tt>; <span class="emphasis"><em>I1</em></span> and <span class="emphasis"><em>I2</em></span>
|
||||
are Input Iterators; <span class="emphasis"><em>c</em></span> is a value of type <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span></tt>;
|
||||
<span class="emphasis"><em>s</em></span> is an object of type <tt class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></tt>;
|
||||
<span class="emphasis"><em>cs</em></span> is an object of type <tt class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></tt>; <span class="emphasis"><em>b</em></span> is
|
||||
a value of type <tt class="computeroutput"><span class="keyword">bool</span></tt>; <span class="emphasis"><em>I</em></span>
|
||||
is a value of type <tt class="computeroutput"><span class="keyword">int</span></tt>; <span class="emphasis"><em>F1</em></span>
|
||||
and <span class="emphasis"><em>F2</em></span> are values of type <tt class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">charT</span><span class="special">*</span></tt>;
|
||||
and <span class="emphasis"><em>loc</em></span> is an object of type <tt class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">locale_type</span></tt>.
|
||||
type <code class="computeroutput"><span class="identifier">charT</span></code>; <span class="emphasis"><em>u</em></span>
|
||||
is an object of type <code class="computeroutput"><span class="identifier">X</span></code>;
|
||||
<span class="emphasis"><em>v</em></span> is an object of type <code class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">X</span></code>; <span class="emphasis"><em>p</em></span> is
|
||||
a value of type <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></code>; <span class="emphasis"><em>I1</em></span> and <span class="emphasis"><em>I2</em></span>
|
||||
are Input Iterators; <span class="emphasis"><em>c</em></span> is a value of type <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span></code>;
|
||||
<span class="emphasis"><em>s</em></span> is an object of type <code class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></code>;
|
||||
<span class="emphasis"><em>cs</em></span> is an object of type <code class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">X</span><span class="special">::</span><span class="identifier">string_type</span></code>; <span class="emphasis"><em>b</em></span> is
|
||||
a value of type <code class="computeroutput"><span class="keyword">bool</span></code>; <span class="emphasis"><em>I</em></span>
|
||||
is a value of type <code class="computeroutput"><span class="keyword">int</span></code>; <span class="emphasis"><em>F1</em></span>
|
||||
and <span class="emphasis"><em>F2</em></span> are values of type <code class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">charT</span><span class="special">*</span></code>;
|
||||
and <span class="emphasis"><em>loc</em></span> is an object of type <code class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">locale_type</span></code>.
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
@ -329,7 +327,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
v.value(c, i)
|
||||
v.value(c, I)
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -380,39 +378,19 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
v.error_string(i)
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
std::string
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns a human readable error string for the error condition i,
|
||||
where i is one of the values enumerated by type regex_constants::error_type.
|
||||
If the value i is not recognized then returns the string "Unknown
|
||||
error" or a localized equivalent.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h4>
|
||||
<a name="id590748"></a>
|
||||
<a name="boost_regex.ref.concepts.traits_concept.additional_optional_requirements"></a><h5>
|
||||
<a name="id633573"></a>
|
||||
<a href="traits_concept.html#boost_regex.ref.concepts.traits_concept.additional_optional_requirements">Additional
|
||||
Optional Requirements</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following additional requirements are strictly optional, however in
|
||||
order for <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>
|
||||
order for <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
|
||||
to take advantage of these additional interfaces, all of the following
|
||||
requirements must be met; <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> will detect the presence
|
||||
or absense of the member <tt class="computeroutput"><span class="identifier">boost_extensions_tag</span></tt>
|
||||
requirements must be met; <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> will detect the presence
|
||||
or absense of the member <code class="computeroutput"><span class="identifier">boost_extensions_tag</span></code>
|
||||
and configure itself appropriately.
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -493,8 +471,8 @@
|
||||
that signifies the meaning of character c within the regular expression
|
||||
grammar, when c has been preceded by an escape character. Precondition:
|
||||
if b is the character preceding c in the expression being parsed
|
||||
then: <tt class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">syntax_type</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span>
|
||||
<span class="special">==</span> <span class="identifier">syntax_escape</span></tt>
|
||||
then: <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">syntax_type</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span>
|
||||
<span class="special">==</span> <span class="identifier">syntax_escape</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -512,9 +490,9 @@
|
||||
<td>
|
||||
<p>
|
||||
Returns a character d such that: for any character d that is to
|
||||
be considered equivalent to c then <tt class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">false</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span><span class="keyword">false</span><span class="special">)</span></tt>. Likewise for all characters C
|
||||
be considered equivalent to c then <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">false</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span><span class="keyword">false</span><span class="special">)</span></code>. Likewise for all characters C
|
||||
that are to be considered equivalent to c when comparisons are
|
||||
to be performed without regard to case, then <tt class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">true</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">C</span><span class="special">,</span><span class="keyword">true</span><span class="special">)</span></tt>.
|
||||
to be performed without regard to case, then <code class="computeroutput"><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span><span class="keyword">true</span><span class="special">)==</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">translate</span><span class="special">(</span><span class="identifier">C</span><span class="special">,</span><span class="keyword">true</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -531,9 +509,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Behaves as follows: if <tt class="computeroutput"><span class="identifier">p</span>
|
||||
<span class="special">==</span> <span class="identifier">q</span></tt>
|
||||
or if <tt class="computeroutput"><span class="special">*</span><span class="identifier">p</span></tt>
|
||||
Behaves as follows: if <code class="computeroutput"><span class="identifier">p</span>
|
||||
<span class="special">==</span> <span class="identifier">q</span></code>
|
||||
or if <code class="computeroutput"><span class="special">*</span><span class="identifier">p</span></code>
|
||||
is not a digit character then returns -1. Otherwise performs formatted
|
||||
numeric input on the sequence [p,q) and returns the result as an
|
||||
int. Postcondition: either p == q or *p is a non-digit character.
|
||||
@ -543,7 +521,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
v.error_string(i)
|
||||
v.error_string(I)
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -555,8 +533,8 @@
|
||||
<p>
|
||||
Returns a human readable error string for the error condition i,
|
||||
where i is one of the values enumerated by type regex_constants::error_type.
|
||||
If the value i is not recognized then returns the string "Unknown
|
||||
error" or a localized equivalent.
|
||||
If the value <span class="emphasis"><em>I</em></span> is not recognized then returns
|
||||
the string "Unknown error" or a localized equivalent.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -601,10 +579,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -3,21 +3,19 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Deprecated Interfaces</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="concepts/iterator_concepts.html" title=" Iterator
|
||||
Rrequirements">
|
||||
<link rel="next" href="deprecated_interfaces/regex_format.html" title="
|
||||
regex_format (Deprecated)">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="concepts/iterator_concepts.html" title="Iterator Requirements">
|
||||
<link rel="next" href="deprecated_interfaces/regex_format.html" title="regex_format (Deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces"></a><a href="deprecated_interfaces.html" title="Deprecated Interfaces">Deprecated Interfaces</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.deprecated_interfaces"></a><a href="deprecated_interfaces.html" title="Deprecated Interfaces">Deprecated Interfaces</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="deprecated_interfaces/regex_format.html">
|
||||
regex_format (Deprecated)</a></span></dt>
|
||||
@ -37,21 +36,14 @@
|
||||
<dt><span class="section"><a href="deprecated_interfaces/old_regex.html"> High
|
||||
Level Class RegEx (Deprecated)</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> High
|
||||
Level Class RegEx (Deprecated)</title>
|
||||
<title>High Level Class RegEx (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="regex_split.html" title="
|
||||
regex_split (deprecated)">
|
||||
<link rel="prev" href="regex_split.html" title="regex_split (deprecated)">
|
||||
<link rel="next" href="../../background_information.html" title="Background Information">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,17 +24,16 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a href="old_regex.html" title=" High
|
||||
Level Class RegEx (Deprecated)"> High
|
||||
Level Class RegEx (Deprecated)</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.old_regex"></a><a href="old_regex.html" title="High Level Class RegEx (Deprecated)"> High
|
||||
Level Class RegEx (Deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The high level wrapper class RegEx is now deprecated and does not form
|
||||
part of the regular expression standardization proposal. This type still
|
||||
exists, and existing code will continue to compile, however the following
|
||||
documentation is unlikely to be further updated.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The class RegEx provides a high level simplified interface to the regular
|
||||
@ -44,8 +41,7 @@
|
||||
regular expressions always follow the "normal" syntax - that
|
||||
is the same as the perl / ECMAScript synatx.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">GrepFileCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">expression</span><span class="special">);</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(*</span><span class="identifier">FindFilesCallback</span><span class="special">)(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">file</span><span class="special">);</span>
|
||||
|
||||
@ -138,7 +134,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">();</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">();</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -151,7 +147,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -164,40 +160,40 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">icase</span> <span class="special">=</span>
|
||||
<span class="keyword">false</span><span class="special">);</span></tt>
|
||||
<span class="keyword">false</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>c</em></span>,
|
||||
if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">icase</span> <span class="special">=</span>
|
||||
<span class="keyword">false</span><span class="special">);</span></tt>
|
||||
<span class="keyword">false</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Constructs an instance of RegEx, setting the expression to <span class="emphasis"><em>s</em></span>,
|
||||
if <span class="emphasis"><em>icase</em></span> is true then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
to case, otherwise it is sensitive to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">RegEx</span><span class="special">&</span> <span class="identifier">o</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -209,68 +205,68 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assignment operator, equivalent to calling <tt class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></tt>. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">RegEx</span><span class="special">&</span>
|
||||
<span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assignment operator, equivalent to calling <tt class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></tt>. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
Assignment operator, equivalent to calling <code class="computeroutput"><span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="keyword">false</span><span class="special">)</span></code>. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">SetExpression</span><span class="special">(</span><span class="identifier">constchar</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">icase</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Sets the current expression to <span class="emphasis"><em>p</em></span>, if <span class="emphasis"><em>icase</em></span>
|
||||
is true then matching is insensitive to case, otherwise it is sensitive
|
||||
to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">SetExpression</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">icase</span> <span class="special">=</span>
|
||||
<span class="keyword">false</span><span class="special">);</span></tt>
|
||||
<span class="keyword">false</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Sets the current expression to <span class="emphasis"><em>s</em></span>, if <span class="emphasis"><em>icase</em></span>
|
||||
is true then matching is insensitive to case, otherwise it is sensitive
|
||||
to case. Throws <a href="../bad_expression.html" title=" bad_expression"><tt class="computeroutput"><span class="identifier">bad_expression</span></tt></a> on failure.
|
||||
to case. Throws <a href="../bad_expression.html" title="bad_expression"><code class="computeroutput"><span class="identifier">bad_expression</span></code></a> on failure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Expression</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -282,17 +278,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Attempts to match the current expression against the text <span class="emphasis"><em>p</em></span>
|
||||
using the match flags <span class="emphasis"><em>flags</em></span> - see <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>. Returns
|
||||
using the match flags <span class="emphasis"><em>flags</em></span> - see <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>. Returns
|
||||
<span class="emphasis"><em>true</em></span> if the expression matches the whole of
|
||||
the input string.
|
||||
</p>
|
||||
@ -301,17 +297,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Match</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Attempts to match the current expression against the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the expression matches the
|
||||
whole of the input string.
|
||||
</p>
|
||||
@ -320,17 +316,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Attempts to find a match for the current expression somewhere in
|
||||
the text <span class="emphasis"><em>p</em></span> using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
the text <span class="emphasis"><em>p</em></span> using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
|
||||
</p>
|
||||
</td>
|
||||
@ -338,17 +334,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Search</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Attempts to find a match for the current expression somewhere in
|
||||
the text <span class="emphasis"><em>s</em></span> using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags.
|
||||
the text <span class="emphasis"><em>s</em></span> using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
Returns <span class="emphasis"><em>true</em></span> if the match succeeds.
|
||||
</p>
|
||||
</td>
|
||||
@ -356,19 +352,19 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match found calls the call-back function cb as: <tt class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></tt>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match found calls the call-back function cb as: <code class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></code>
|
||||
If at any stage the call-back function returns <span class="emphasis"><em>false</em></span>
|
||||
then the grep operation terminates, otherwise continues until no
|
||||
further matches are found. Returns the number of matches found.
|
||||
@ -378,19 +374,19 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">GrepCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags.
|
||||
For each match found calls the call-back function cb as: <tt class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></tt>
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
For each match found calls the call-back function cb as: <code class="computeroutput"><span class="identifier">cb</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span></code>
|
||||
If at any stage the call-back function returns false then the grep
|
||||
operation terminates, otherwise continues until no further matches
|
||||
are found. Returns the number of matches found.
|
||||
@ -400,18 +396,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span>
|
||||
<span class="identifier">v</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> flags.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> flags.
|
||||
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
|
||||
Returns the number of matches found.
|
||||
</p>
|
||||
@ -420,18 +416,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span>
|
||||
<span class="identifier">v</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match pushes a copy of what matched onto <span class="emphasis"><em>v</em></span>.
|
||||
Returns the number of matches found.
|
||||
</p>
|
||||
@ -440,18 +436,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>p</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match pushes the starting index of what matched onto
|
||||
<span class="emphasis"><em>v</em></span>. Returns the number of matches found.
|
||||
</p>
|
||||
@ -460,18 +456,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Grep</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the text <span class="emphasis"><em>s</em></span>
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match pushes the starting index of what matched onto
|
||||
<span class="emphasis"><em>v</em></span>. Returns the number of matches found.
|
||||
</p>
|
||||
@ -480,20 +476,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the files files
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match calls the call-back function cb. If the call-back
|
||||
returns false then the algorithm returns without considering further
|
||||
matches in the current file, or any further files.
|
||||
@ -507,7 +503,7 @@
|
||||
Returns the total number of matches found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -515,20 +511,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">GrepFiles</span><span class="special">(</span><span class="identifier">GrepFileCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Finds all matches of the current expression in the files files
|
||||
using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each match calls the call-back function cb.
|
||||
</p>
|
||||
<p>
|
||||
@ -545,7 +541,7 @@
|
||||
Returns the total number of matches found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -553,20 +549,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Searches files to find all those which contain at least one match
|
||||
of the current expression using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
of the current expression using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each matching file calls the call-back function cb. If the
|
||||
call-back returns false then the algorithm returns without considering
|
||||
any further files.
|
||||
@ -580,7 +576,7 @@
|
||||
Returns the total number of files found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -588,20 +584,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">FindFiles</span><span class="special">(</span><span class="identifier">FindFilesCallback</span> <span class="identifier">cb</span><span class="special">,</span> <span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">files</span><span class="special">,</span>
|
||||
<span class="keyword">bool</span> <span class="identifier">recurse</span>
|
||||
<span class="special">=</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Searches files to find all those which contain at least one match
|
||||
of the current expression using the <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>flags</em></span>.
|
||||
of the current expression using the <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>flags</em></span>.
|
||||
For each matching file calls the call-back function cb.
|
||||
</p>
|
||||
<p>
|
||||
@ -617,7 +613,7 @@
|
||||
Returns the total number of files found.
|
||||
</p>
|
||||
<p>
|
||||
May throw an exception derived from <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
May throw an exception derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if file io fails.
|
||||
</p>
|
||||
</td>
|
||||
@ -625,14 +621,14 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span>
|
||||
<span class="identifier">in</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">copy</span> <span class="special">=</span>
|
||||
<span class="keyword">true</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -645,22 +641,22 @@
|
||||
If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections
|
||||
of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span>
|
||||
is set then only the first occurance of the pattern found is replaced.
|
||||
Returns the new string. See also <a href="../../format.html" title=" Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>.
|
||||
Returns the new string. See also <a href="../../format.html" title="Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">Merge</span><span class="special">(</span><span class="keyword">const</span>
|
||||
<span class="keyword">char</span><span class="special">*</span>
|
||||
<span class="identifier">in</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="keyword">bool</span>
|
||||
<span class="identifier">copy</span> <span class="special">=</span>
|
||||
<span class="keyword">true</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -673,19 +669,19 @@
|
||||
If <span class="emphasis"><em>copy</em></span> is true then all unmatched sections
|
||||
of input are copied unchanged to output, if the flag <span class="emphasis"><em>format_first_only</em></span>
|
||||
is set then only the first occurance of the pattern found is replaced.
|
||||
Returns the new string. See also <a href="../../format.html" title=" Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>.
|
||||
Returns the new string. See also <a href="../../format.html" title="Search and Replace Format String Syntax">format
|
||||
string syntax</a>, and <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">Split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span>
|
||||
<span class="identifier">flags</span> <span class="special">=</span>
|
||||
<span class="identifier">match_default</span><span class="special">,</span>
|
||||
<span class="keyword">unsigned</span> <span class="identifier">max_count</span>
|
||||
<span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span></tt>
|
||||
<span class="special">=</span> <span class="special">~</span><span class="number">0</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -706,17 +702,17 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Position</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns the position of what matched sub-expression <span class="emphasis"><em>i</em></span>.
|
||||
If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></tt> then returns the position
|
||||
of the whole match. Returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>
|
||||
If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></code> then returns the position
|
||||
of the whole match. Returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>
|
||||
if the supplied index is invalid, or if the specified sub-expression
|
||||
did not participate in the match.
|
||||
</p>
|
||||
@ -725,16 +721,16 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns the length of what matched sub-expression i. If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></tt> then returns the length
|
||||
of the whole match. Returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>
|
||||
Returns the length of what matched sub-expression i. If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></code> then returns the length
|
||||
of the whole match. Returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>
|
||||
if the supplied index is invalid, or if the specified sub-expression
|
||||
did not participate in the match.
|
||||
</p>
|
||||
@ -743,8 +739,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">Matched</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -757,23 +753,23 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Line</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns the line on which the match occurred, indexes start from
|
||||
1 not zero, if no match occurred then returns <tt class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></tt>.
|
||||
1 not zero, if no match occurred then returns <code class="computeroutput"><span class="identifier">RegEx</span><span class="special">::</span><span class="identifier">npos</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">Marks</span><span class="special">()</span>
|
||||
<span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -787,14 +783,14 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">What</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">What</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns a copy of what matched sub-expression <span class="emphasis"><em>i</em></span>.
|
||||
If <tt class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></tt> then returns a copy of
|
||||
If <code class="computeroutput"><span class="identifier">i</span> <span class="special">=</span>
|
||||
<span class="number">0</span></code> then returns a copy of
|
||||
the whole match. Returns a null string if the index is invalid
|
||||
or if the specified sub-expression did not participate in a match.
|
||||
</p>
|
||||
@ -803,13 +799,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span>
|
||||
<span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span> <span class="special">;</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span>
|
||||
<span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span> <span class="special">;</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Returns <tt class="computeroutput"><span class="identifier">what</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span></tt>
|
||||
Returns <code class="computeroutput"><span class="identifier">what</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span></code>
|
||||
Can be used to simplify access to sub-expression matches, and make
|
||||
usage more perl-like.
|
||||
</p>
|
||||
@ -820,10 +816,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
regex_format (Deprecated)</title>
|
||||
<title>regex_format (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="next" href="regex_grep.html" title="
|
||||
regex_grep (Deprecated)">
|
||||
<link rel="next" href="regex_grep.html" title="regex_grep (Deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,31 +24,29 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a href="regex_format.html" title="
|
||||
regex_format (Deprecated)">
|
||||
regex_format (Deprecated)</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format"></a><a href="regex_format.html" title="regex_format (Deprecated)">
|
||||
regex_format (Deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The algorithm <tt class="computeroutput"><span class="identifier">regex_format</span></tt>
|
||||
is deprecated; new code should use <a href="../match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></tt></a> instead. Existing code
|
||||
The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
|
||||
is deprecated; new code should use <a href="../match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></code></a> instead. Existing code
|
||||
will continue to compile, the following documentation is taken from the
|
||||
previous version of Boost.Regex and will not be further updated:
|
||||
</p>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h4>
|
||||
<a name="id591505"></a>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format"></a><h5>
|
||||
<a name="id634317"></a>
|
||||
<a href="regex_format.html#boost_regex.ref.deprecated_interfaces.regex_format.algorithm_regex_format">Algorithm
|
||||
regex_format</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The algorithm <tt class="computeroutput"><span class="identifier">regex_format</span></tt>
|
||||
The algorithm <code class="computeroutput"><span class="identifier">regex_format</span></code>
|
||||
takes the results of a match and creates a new string based upon a format
|
||||
string, <tt class="computeroutput"><span class="identifier">regex_format</span></tt> can
|
||||
string, <code class="computeroutput"><span class="identifier">regex_format</span></code> can
|
||||
be used for search and replace operations:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <span class="identifier">regex_format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
@ -62,7 +58,7 @@
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="number">0</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The library also defines the following convenience variation of <tt class="computeroutput"><span class="identifier">regex_format</span></tt>, which returns the result
|
||||
The library also defines the following convenience variation of <code class="computeroutput"><span class="identifier">regex_format</span></code>, which returns the result
|
||||
directly as a string, rather than outputting to an iterator.
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
@ -70,13 +66,12 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/html/images/note.png"></td>
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
This version may not be available, or may be available in a more limited
|
||||
form, depending upon your compilers capabilities
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="identifier">regex_format</span>
|
||||
<span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
@ -112,7 +107,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">OutputIterator</span> <span class="identifier">out</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">OutputIterator</span> <span class="identifier">out</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -125,12 +120,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
An instance of <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> obtained
|
||||
An instance of <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> obtained
|
||||
from one of the matching algorithms above, and denoting what matched.
|
||||
</p>
|
||||
</td>
|
||||
@ -138,7 +133,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">fmt</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -151,7 +146,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">flags</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="identifier">flags</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -163,19 +158,20 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
Format flags are described under <a href="../match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>.
|
||||
Format flags are described under <a href="../match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
<p>
|
||||
The format string syntax (and available options) is described more fully
|
||||
under <a href="../../format.html" title=" Search and Replace Format String Syntax">format strings</a>.
|
||||
under <a href="../../format.html" title="Search and Replace Format String Syntax">format strings</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
regex_grep (Deprecated)</title>
|
||||
<title>regex_grep (Deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="regex_format.html" title="
|
||||
regex_format (Deprecated)">
|
||||
<link rel="next" href="regex_split.html" title="
|
||||
regex_split (deprecated)">
|
||||
<link rel="prev" href="regex_format.html" title="regex_format (Deprecated)">
|
||||
<link rel="next" href="regex_split.html" title="regex_split (deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,28 +24,26 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a href="regex_grep.html" title="
|
||||
regex_grep (Deprecated)">
|
||||
regex_grep (Deprecated)</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_grep"></a><a href="regex_grep.html" title="regex_grep (Deprecated)">
|
||||
regex_grep (Deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The algorithm <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
is deprecated in favor of <a href="../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> which provides
|
||||
The algorithm <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
is deprecated in favor of <a href="../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> which provides
|
||||
a more convenient and standard library friendly interface.
|
||||
</p>
|
||||
<p>
|
||||
The following documentation is taken unchanged from the previous boost
|
||||
release, and will not be updated in future.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">regex_grep</span></tt> allows you to
|
||||
<code class="computeroutput"><span class="identifier">regex_grep</span></code> allows you to
|
||||
search through a bidirectional-iterator range and locate all the (non-overlapping)
|
||||
matches with a given regular expression. The function is declared as:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span>
|
||||
<span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span>
|
||||
<span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
@ -57,12 +52,11 @@
|
||||
</pre>
|
||||
<p>
|
||||
The library also defines the following convenience versions, which take
|
||||
either a <tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></tt>, or a <tt class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><>&</span></tt>
|
||||
either a <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span></code>, or a <code class="computeroutput"><span class="keyword">const</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><>&</span></code>
|
||||
in place of a pair of iterators.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regex_grep</span><span class="special">(</span><span class="identifier">Predicate</span> <span class="identifier">foo</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
@ -75,7 +69,7 @@
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The parameters for the primary version of <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
The parameters for the primary version of <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
have the following meanings:
|
||||
</p>
|
||||
<p>
|
||||
@ -97,9 +91,9 @@
|
||||
</p>
|
||||
<p>
|
||||
The algorithm finds all of the non-overlapping matches of the expression
|
||||
<span class="emphasis"><em>e</em></span>, for each match it fills a <tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></tt> structure, which contains information
|
||||
<span class="emphasis"><em>e</em></span>, for each match it fills a <code class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></code> structure, which contains information
|
||||
on what matched, and calls the predicate <span class="emphasis"><em>foo</em></span>, passing
|
||||
the <tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></tt>
|
||||
the <code class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">></span></code>
|
||||
as a single argument. If the predicate returns <span class="emphasis"><em>true</em></span>,
|
||||
then the grep operation continues, otherwise it terminates without searching
|
||||
for further matches. The function returns the number of matches found.
|
||||
@ -107,8 +101,7 @@
|
||||
<p>
|
||||
The general form of the predicate is:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">struct</span> <span class="identifier">grep_predicate</span>
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">grep_predicate</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">iterator_type</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
<span class="special">};</span>
|
||||
@ -123,12 +116,12 @@
|
||||
utilities would output the results to the screen, another program could
|
||||
index a file based on a regular expression and store a set of bookmarks
|
||||
in a list, or a text file conversion utility would output to file. The
|
||||
results of one <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
can even be chained into another <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
results of one <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
can even be chained into another <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
to create recursive parsers.
|
||||
</p>
|
||||
<p>
|
||||
The algorithm may throw <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
The algorithm may throw <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an <span class="emphasis"><em>N</em></span>
|
||||
character string begins to exceed O(N<sup>2</sup>), or if the program runs out of
|
||||
stack space while matching the expression (if Boost.Regex is configured
|
||||
@ -136,10 +129,9 @@
|
||||
(if Boost.Regex is configured in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
Example: convert the example from <a href="../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> to use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt> instead:
|
||||
Example: convert the example from <a href="../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> to use <code class="computeroutput"><span class="identifier">regex_grep</span></code> instead:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
|
||||
@ -198,11 +190,10 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Example: Use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
Example: Use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
to call a global callback function:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
|
||||
@ -258,12 +249,11 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Example: use <tt class="computeroutput"><span class="identifier">regex_grep</span></tt>
|
||||
to call a class member function, use the standard library adapters <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">mem_fun</span></tt> and <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bind1st</span></tt>
|
||||
Example: use <code class="computeroutput"><span class="identifier">regex_grep</span></code>
|
||||
to call a class member function, use the standard library adapters <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">mem_fun</span></code> and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bind1st</span></code>
|
||||
to convert the member function into a predicate:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">functional</span><span class="special">></span>
|
||||
@ -316,8 +306,7 @@
|
||||
Finally, C++ Builder users can use C++ Builder's closure type as a callback
|
||||
argument:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">functional</span><span class="special">></span>
|
||||
@ -373,10 +362,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
regex_split (deprecated)</title>
|
||||
<title>regex_split (deprecated)</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../deprecated_interfaces.html" title="Deprecated Interfaces">
|
||||
<link rel="prev" href="regex_grep.html" title="
|
||||
regex_grep (Deprecated)">
|
||||
<link rel="next" href="old_regex.html" title=" High
|
||||
Level Class RegEx (Deprecated)">
|
||||
<link rel="prev" href="regex_grep.html" title="regex_grep (Deprecated)">
|
||||
<link rel="next" href="old_regex.html" title="High Level Class RegEx (Deprecated)">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,31 +24,26 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a href="regex_split.html" title="
|
||||
regex_split (deprecated)">
|
||||
regex_split (deprecated)</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.deprecated_interfaces.regex_split"></a><a href="regex_split.html" title="regex_split (deprecated)">
|
||||
regex_split (deprecated)</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The algorithm <a href="regex_split.html" title="
|
||||
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> has been deprecated
|
||||
in favor of the iterator <a href="../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> which has
|
||||
The algorithm <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> has been deprecated
|
||||
in favor of the iterator <a href="../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> which has
|
||||
a more flexible and powerful interface, as well as following the more usual
|
||||
standard library "pull" rather than "push" semantics.
|
||||
</p>
|
||||
<p>
|
||||
Code which uses <a href="regex_split.html" title="
|
||||
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> will continue to compile,
|
||||
Code which uses <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> will continue to compile,
|
||||
the following documentation is taken from a previous Boost.Regex version:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
Algorithm <a href="regex_split.html" title="
|
||||
regex_split (deprecated)"><tt class="computeroutput"><span class="identifier">regex_split</span></tt></a> performs a similar
|
||||
Algorithm <a href="regex_split.html" title="regex_split (deprecated)"><code class="computeroutput"><span class="identifier">regex_split</span></code></a> performs a similar
|
||||
operation to the perl split operation, and comes in three overloaded forms:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits2</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits2</span><span class="special">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits2</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
@ -69,7 +61,7 @@
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">Traits1</span><span class="special">,</span> <span class="identifier">Alloc1</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Each version of the algorithm
|
||||
<span class="bold"><strong>Effects</strong></span>: Each version of the algorithm
|
||||
takes an output-iterator for output, and a string for input. If the expression
|
||||
contains no marked sub-expressions, then the algorithm writes one string
|
||||
onto the output-iterator for each section of input that does not match
|
||||
@ -80,11 +72,11 @@
|
||||
processed will be deleted from the string <span class="emphasis"><em>s</em></span> (if <span class="emphasis"><em>max_split</em></span>
|
||||
is not reached then all of <span class="emphasis"><em>s</em></span> will be deleted). Returns
|
||||
the number of strings written to the output-iterator. If the parameter
|
||||
<span class="emphasis"><em>max_split</em></span> is not specified then it defaults to <tt class="computeroutput"><span class="identifier">UINT_MAX</span></tt>. If no expression is specified,
|
||||
<span class="emphasis"><em>max_split</em></span> is not specified then it defaults to <code class="computeroutput"><span class="identifier">UINT_MAX</span></code>. If no expression is specified,
|
||||
then it defaults to "\s+", and splitting occurs on whitespace.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while
|
||||
matching the expression (if Boost.Regex is configured in recursive mode),
|
||||
@ -92,12 +84,11 @@
|
||||
is configured in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example</b></span>: the following function will split
|
||||
<span class="bold"><strong>Example</strong></span>: the following function will split
|
||||
the input string into a series of tokens, and remove each token from the
|
||||
string <span class="emphasis"><em>s</em></span>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">unsigned</span> <span class="identifier">tokenise</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="keyword">unsigned</span> <span class="identifier">tokenise</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>&</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">s</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_split</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">s</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
@ -106,8 +97,7 @@
|
||||
Example: the following short program will extract all of the URL's from
|
||||
a html file, and print them out to cout:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">list</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">list</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -159,10 +149,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> error_type</title>
|
||||
<title>error_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="match_flag_type.html" title=" match_flag_type">
|
||||
<link rel="next" href="regex_traits.html" title=" regex_traits">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="match_flag_type.html" title="match_flag_type">
|
||||
<link rel="next" href="regex_traits.html" title="regex_traits">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,17 +24,17 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.error_type"></a><a href="error_type.html" title=" error_type"> error_type</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.error_type.synopsis"></a><h4>
|
||||
<a name="id569168"></a>
|
||||
<a name="boost_regex.ref.error_type"></a><a href="error_type.html" title="error_type"> error_type</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.ref.error_type.synopsis"></a><h5>
|
||||
<a name="id612137"></a>
|
||||
<a href="error_type.html#boost_regex.ref.error_type.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Type error type represents the different types of errors that can be raised
|
||||
by the library when parsing a regular expression.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">error_type</span><span class="special">;</span>
|
||||
|
||||
@ -56,12 +56,12 @@
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants
|
||||
</span><span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<a name="boost_regex.ref.error_type.description"></a><h4>
|
||||
<a name="id569735"></a>
|
||||
<a name="boost_regex.ref.error_type.description"></a><h5>
|
||||
<a name="id612702"></a>
|
||||
<a href="error_type.html#boost_regex.ref.error_type.description">Description</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="identifier">error_type</span></tt> is an
|
||||
The type <code class="computeroutput"><span class="identifier">error_type</span></code> is an
|
||||
implementation-specific enumeration type that may take one of the following
|
||||
values:
|
||||
</p>
|
||||
@ -257,10 +257,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> match_flag_type</title>
|
||||
<title>match_flag_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="
|
||||
Options for Literal Strings">
|
||||
<link rel="next" href="error_type.html" title=" error_type">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="Options for Literal Strings">
|
||||
<link rel="next" href="error_type.html" title="error_type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,15 +24,15 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.match_flag_type"></a><a href="match_flag_type.html" title=" match_flag_type"> match_flag_type</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.match_flag_type"></a><a href="match_flag_type.html" title="match_flag_type"> match_flag_type</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="identifier">match_flag_type</span></tt>
|
||||
The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
|
||||
is an implementation specific bitmask type (see C++ std 17.3.2.1.2) that
|
||||
controls how a regular expression is matched against a character sequence.
|
||||
The behavior of the format flags is described in more detail in the <a href="../format.html" title=" Search and Replace Format String Syntax">format syntax guide</a>.
|
||||
The behavior of the format flags is described in more detail in the <a href="../format.html" title="Search and Replace Format String Syntax">format syntax guide</a>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">implemenation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">match_flag_type</span><span class="special">;</span>
|
||||
|
||||
@ -69,12 +68,12 @@
|
||||
<span class="special">}</span> <span class="comment">// namespace regex_constants
|
||||
</span><span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<a name="boost_regex.ref.match_flag_type.description"></a><h4>
|
||||
<a name="id568392"></a>
|
||||
<a name="boost_regex.ref.match_flag_type.description"></a><h5>
|
||||
<a name="id611372"></a>
|
||||
<a href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="identifier">match_flag_type</span></tt>
|
||||
The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
|
||||
is an implementation specific bitmask type (see C++ std 17.3.2.1.2). When
|
||||
matching a regular expression against a sequence of characters [first, last)
|
||||
then setting its elements has the effects listed in the table below:
|
||||
@ -314,7 +313,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Specified that the expression "." does not match a character
|
||||
Specifies that the expression "." does not match a character
|
||||
null '\0'.
|
||||
</p>
|
||||
</td>
|
||||
@ -328,8 +327,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Specifies that the expression should be matched according to the
|
||||
POSIX <a href="../syntax/leftmost_longest_rule.html" title=" The Leftmost
|
||||
Longest Rule">leftmost-longest
|
||||
POSIX <a href="../syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
|
||||
rule</a>, regardless of what kind of expression was compiled.
|
||||
Be warned that these rules do not work well with many Perl-specific
|
||||
features such as non-greedy repeats.
|
||||
@ -360,7 +358,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Makes the expression behave as if it had no marked subexpressions,
|
||||
no matter how many capturing groups are actually present. The <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a>
|
||||
no matter how many capturing groups are actually present. The <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
|
||||
class will only contain information about the overall match, and
|
||||
not any sub-expressions.
|
||||
</p>
|
||||
@ -380,7 +378,7 @@
|
||||
Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1).
|
||||
</p>
|
||||
<p>
|
||||
This is functionally identical to the <a href="../format/perl_format.html" title=" Perl Format String Syntax">Perl
|
||||
This is functionally identical to the <a href="../format/perl_format.html" title="Perl Format String Syntax">Perl
|
||||
format string rules</a>.
|
||||
</p>
|
||||
<p>
|
||||
@ -402,7 +400,7 @@
|
||||
Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using the rules
|
||||
used by the Unix sed utility in IEEE Std 1003.1-2001, Portable Operating
|
||||
SystemInterface (POSIX ), Shells and Utilities. See also the <a href="../format/sed_format.html" title=" Sed Format String Syntax">Sed Format string reference</a>.
|
||||
SystemInterface (POSIX ), Shells and Utilities. See also the <a href="../format/sed_format.html" title="Sed Format String Syntax">Sed Format string reference</a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -415,7 +413,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using <a href="../format/perl_format.html" title=" Perl Format String Syntax">the
|
||||
by a new string, that the new string is constructed using <a href="../format/perl_format.html" title="Perl Format String Syntax">the
|
||||
same rules as Perl 5</a>.
|
||||
</p>
|
||||
</td>
|
||||
@ -428,7 +426,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Specified that when a regular expression match is to be replaced
|
||||
Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is a literal copy of the replacement
|
||||
text.
|
||||
</p>
|
||||
@ -443,8 +441,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Specifies that all syntax extensions are enabled, including conditional
|
||||
(?ddexpression1:expression2) replacements: see the <a href="../format/boost_format_syntax.html" title=" Boost-Extended
|
||||
Format String Syntax">format
|
||||
(?ddexpression1:expression2) replacements: see the <a href="../format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">format
|
||||
string guide</a> for more details.
|
||||
</p>
|
||||
</td>
|
||||
@ -481,10 +478,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> match_results</title>
|
||||
<title>match_results</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="basic_regex.html" title=" basic_regex">
|
||||
<link rel="next" href="sub_match.html" title=" sub_match">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="basic_regex.html" title="basic_regex">
|
||||
<link rel="next" href="sub_match.html" title="sub_match">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,45 +24,44 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.match_results"></a><a href="match_results.html" title=" match_results"> match_results</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.match_results.synopsis"></a><h4>
|
||||
<a name="id498310"></a>
|
||||
<a name="boost_regex.ref.match_results"></a><a href="match_results.html" title="match_results"> match_results</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.ref.match_results.synopsis"></a><h5>
|
||||
<a name="id541842"></a>
|
||||
<a href="match_results.html#boost_regex.ref.match_results.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
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 <tt class="computeroutput"><span class="identifier">match_results</span></tt> that acts as an indexed collection
|
||||
matches back to the user: this is achieved this by defining a class <code class="computeroutput"><span class="identifier">match_results</span></code> that acts as an indexed collection
|
||||
of sub-expression matches, each sub-expression match being contained in an
|
||||
object of type <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>.
|
||||
object of type <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>.
|
||||
</p>
|
||||
<p>
|
||||
Template class <tt class="computeroutput"><span class="identifier">match_results</span></tt>
|
||||
Template class <code class="computeroutput"><span class="identifier">match_results</span></code>
|
||||
denotes a collection of character sequences representing the result of a
|
||||
regular expression match. Objects of type <tt class="computeroutput"><span class="identifier">match_results</span></tt>
|
||||
are passed to the algorithms <a href="regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> and <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, and are returned by
|
||||
the iterator <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>. Storage for the
|
||||
regular expression match. Objects of type <code class="computeroutput"><span class="identifier">match_results</span></code>
|
||||
are passed to the algorithms <a href="regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a> and <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, and are returned by
|
||||
the iterator <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>. Storage for the
|
||||
collection is allocated and freed as necessary by the member functions of
|
||||
class <tt class="computeroutput"><span class="identifier">match_results</span></tt>.
|
||||
class <code class="computeroutput"><span class="identifier">match_results</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
The template class <tt class="computeroutput"><span class="identifier">match_results</span></tt>
|
||||
The template class <code class="computeroutput"><span class="identifier">match_results</span></code>
|
||||
conforms to the requirements of a Sequence, as specified in (lib.sequence.reqmts),
|
||||
except that only operations defined for const-qualified Sequences are supported.
|
||||
</p>
|
||||
<p>
|
||||
Class template <tt class="computeroutput"><span class="identifier">match_results</span></tt>
|
||||
is most commonly used as one of the typedefs <tt class="computeroutput"><span class="identifier">cmatch</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">wcmatch</span></tt>, <tt class="computeroutput"><span class="identifier">smatch</span></tt>,
|
||||
or <tt class="computeroutput"><span class="identifier">wsmatch</span></tt>:
|
||||
Class template <code class="computeroutput"><span class="identifier">match_results</span></code>
|
||||
is most commonly used as one of the typedefs <code class="computeroutput"><span class="identifier">cmatch</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">wcmatch</span></code>, <code class="computeroutput"><span class="identifier">smatch</span></code>,
|
||||
or <code class="computeroutput"><span class="identifier">wsmatch</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">Allocator</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special"><</span><span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">match_results</span><span class="special">;</span>
|
||||
|
||||
@ -142,23 +141,22 @@
|
||||
<span class="keyword">void</span> <a href="match_results.html#boost_regex.match_results.op_swap">swap</a><span class="special">(</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m1</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.match_results.description"></a><h4>
|
||||
<a name="id501232"></a>
|
||||
<a name="boost_regex.ref.match_results.description"></a><h5>
|
||||
<a name="id544746"></a>
|
||||
<a href="match_results.html#boost_regex.ref.match_results.description">Description</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
In all <tt class="computeroutput"><span class="identifier">match_results</span></tt> constructors,
|
||||
In all <code class="computeroutput"><span class="identifier">match_results</span></code> constructors,
|
||||
a copy of the Allocator argument is used for any memory allocation performed
|
||||
by the constructor or member functions during the lifetime of the object.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.construct"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span><span class="special">&</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">Allocator</span><span class="special">());</span>
|
||||
<pre class="programlisting"><span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Allocator</span><span class="special">&</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">Allocator</span><span class="special">());</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Constructs an object of class
|
||||
<tt class="computeroutput"><span class="identifier">match_results</span></tt>. The postconditions
|
||||
<span class="bold"><strong>Effects</strong></span>: Constructs an object of class
|
||||
<code class="computeroutput"><span class="identifier">match_results</span></code>. The postconditions
|
||||
of this function are indicated in the table:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -219,20 +217,18 @@
|
||||
</table></div>
|
||||
<a name="boost_regex.match_results.copy_construct"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">match_results</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Constructs an object of class match_results,
|
||||
<span class="bold"><strong>Effects</strong></span>: Constructs an object of class match_results,
|
||||
as a copy of m.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.assign"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">match_results</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">match_results</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Assigns m to *this. The postconditions
|
||||
<span class="bold"><strong>Effects</strong></span>: Assigns m to *this. The postconditions
|
||||
of this function are indicated in the table:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -353,218 +349,201 @@
|
||||
</table></div>
|
||||
<a name="boost_regex.match_results.size"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">size_type</span> <span class="identifier">size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">size_type</span> <span class="identifier">size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the number of <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> elements stored in *this;
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the number of <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> elements stored in *this;
|
||||
that is the number of marked sub-expressions in the regular expression that
|
||||
was matched plus one.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.max_size"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">size_type</span> <span class="identifier">max_size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">size_type</span> <span class="identifier">max_size</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the maximum number of
|
||||
<a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the maximum number of
|
||||
<a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
elements that can be stored in *this.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.empty"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns size() == 0.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns size() == 0.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.length"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">length</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the length of sub-expression
|
||||
<span class="emphasis"><em>sub</em></span>, that is to say: <tt class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">].</span><span class="identifier">length</span><span class="special">()</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the length of sub-expression
|
||||
<span class="emphasis"><em>sub</em></span>, that is to say: <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">].</span><span class="identifier">length</span><span class="special">()</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.position"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">difference_type</span> <span class="identifier">position</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the starting location of
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the starting location of
|
||||
sub-expression <span class="emphasis"><em>sub</em></span>, or -1 if <span class="emphasis"><em>sub</em></span>
|
||||
was not matched. Note that if this represents a partial match , then <tt class="computeroutput"><span class="identifier">position</span><span class="special">()</span></tt>
|
||||
will return the location of the partial match even though <tt class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
was not matched. Note that if this represents a partial match , then <code class="computeroutput"><span class="identifier">position</span><span class="special">()</span></code>
|
||||
will return the location of the partial match even though <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
is false.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.str"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">string_type</span> <span class="identifier">str</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns sub-expression <span class="emphasis"><em>sub</em></span>
|
||||
as a string: <tt class="computeroutput"><span class="identifier">string_type</span><span class="special">((*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">])</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns sub-expression <span class="emphasis"><em>sub</em></span>
|
||||
as a string: <code class="computeroutput"><span class="identifier">string_type</span><span class="special">((*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">sub</span><span class="special">])</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.subscript"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">const_reference</span> <span class="keyword">operator</span><span class="special">[](</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a reference to the <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
object representing the character sequence that matched marked sub-expression
|
||||
<span class="emphasis"><em>n</em></span>. If <tt class="computeroutput"><span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span></tt> then returns
|
||||
a reference to a <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> object representing the
|
||||
<span class="emphasis"><em>n</em></span>. If <code class="computeroutput"><span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span></code> then returns
|
||||
a reference to a <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object representing the
|
||||
character sequence that matched the whole regular expression. If <span class="emphasis"><em>n</em></span>
|
||||
is out of range, or if <span class="emphasis"><em>n</em></span> is an unmatched sub-expression,
|
||||
then returns a <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
then returns a <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
object whose matched member is false.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.prefix"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">const_reference</span> <span class="identifier">prefix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">const_reference</span> <span class="identifier">prefix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a reference to the <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
object representing the character sequence from the start of the string being
|
||||
matched or searched, to the start of the match found.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.suffix"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">const_reference</span> <span class="identifier">suffix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">const_reference</span> <span class="identifier">suffix</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a reference to the <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a reference to the <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
object representing the character sequence from the end of the match found
|
||||
to the end of the string being matched or searched.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.begin"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">const_iterator</span> <span class="identifier">begin</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">const_iterator</span> <span class="identifier">begin</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a starting iterator that
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a starting iterator that
|
||||
enumerates over all the marked sub-expression matches stored in *this.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.end"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a terminating iterator
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a terminating iterator
|
||||
that enumerates over all the marked sub-expression matches stored in *this.
|
||||
</p>
|
||||
<a name="boost_regex.match_results_format"></a><a name="boost_regex.match_results.format"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <span class="identifier">format</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Requires</b></span>: The type <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt>
|
||||
<span class="bold"><strong>Requires</strong></span>: The type <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
|
||||
conforms to the Output Iterator requirements (C++ std 24.1.2).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Copies the character sequence
|
||||
<tt class="computeroutput"><span class="special">[</span><span class="identifier">fmt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span></tt>
|
||||
to <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt> <span class="emphasis"><em>out</em></span>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Copies the character sequence
|
||||
<code class="computeroutput"><span class="special">[</span><span class="identifier">fmt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span></code>
|
||||
to <code class="computeroutput"><span class="identifier">OutputIterator</span></code> <span class="emphasis"><em>out</em></span>.
|
||||
For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>,
|
||||
replace that sequence with either the character(s) it represents, or the
|
||||
sequence of characters within <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> to which it refers. The bitmasks specified
|
||||
sequence of characters within <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to which it refers. The bitmasks specified
|
||||
in flags determines what format specifiers or escape sequences are recognized,
|
||||
by default this is the format used by ECMA-262, ECMAScript Language Specification,
|
||||
Chapter 15 part 5.4.11 String.prototype.replace.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="../format.html" title=" Search and Replace Format String Syntax">format syntax guide for more information</a>.
|
||||
See the <a href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: out.
|
||||
<span class="bold"><strong>Returns</strong></span>: out.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.format2"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">string_type</span> <span class="identifier">format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">string_type</span> <span class="identifier">format</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">string_type</span><span class="special">&</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">format_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a copy of the string <span class="emphasis"><em>fmt</em></span>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a copy of the string <span class="emphasis"><em>fmt</em></span>.
|
||||
For each format specifier or escape sequence in <span class="emphasis"><em>fmt</em></span>,
|
||||
replace that sequence with either the character(s) it represents, or the
|
||||
sequence of characters within <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> to which it refers. The bitmasks specified
|
||||
sequence of characters within <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to which it refers. The bitmasks specified
|
||||
in flags determines what format specifiers or escape sequences are recognized,
|
||||
by default this is the format used by ECMA-262, ECMAScript Language Specification,
|
||||
Chapter 15 part 5.4.11 String.prototype.replace.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="../format.html" title=" Search and Replace Format String Syntax">format syntax guide for more information</a>.
|
||||
See the <a href="../format.html" title="Search and Replace Format String Syntax">format syntax guide for more information</a>.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.get_allocator"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">allocator_type</span> <span class="identifier">get_allocator</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="identifier">allocator_type</span> <span class="identifier">get_allocator</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns a copy of the Allocator
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns a copy of the Allocator
|
||||
that was passed to the object's constructor.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.swap"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Swaps the contents of the two sequences.
|
||||
<span class="bold"><strong>Effects</strong></span>: Swaps the contents of the two sequences.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postcondition</b></span>: *this contains the sequence
|
||||
<span class="bold"><strong>Postcondition</strong></span>: *this contains the sequence
|
||||
of matched sub-expressions that were in that, that contains the sequence
|
||||
of matched sub-expressions that were in *this.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Complexity</b></span>: constant time.
|
||||
<span class="bold"><strong>Complexity</strong></span>: constant time.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.capture_type"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">::</span><span class="identifier">capture_sequence_type</span> <span class="identifier">capture_sequence_type</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">::</span><span class="identifier">capture_sequence_type</span> <span class="identifier">capture_sequence_type</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
Defines an implementation-specific type that satisfies the requirements of
|
||||
a standard library Sequence (21.1.1 including the optional Table 68 operations),
|
||||
whose value_type is a <tt class="computeroutput"><span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span></tt>. This type happens to be <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="special">></span></tt>,
|
||||
whose value_type is a <code class="computeroutput"><span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span></code>. This type happens to be <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">sub_match</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="special">></span></code>,
|
||||
but you shouldn't actually rely on that.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.captures"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">const</span> <span class="identifier">capture_sequence_type</span><span class="special">&</span> <span class="identifier">captures</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">capture_sequence_type</span><span class="special">&</span> <span class="identifier">captures</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns a sequence containing all
|
||||
<span class="bold"><strong>Effects</strong></span>: returns a sequence containing all
|
||||
the captures obtained for sub-expression i.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: <tt class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">captures</span><span class="special">();</span></tt>
|
||||
<span class="bold"><strong>Returns</strong></span>: <code class="computeroutput"><span class="special">(*</span><span class="keyword">this</span><span class="special">)[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">captures</span><span class="special">();</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Preconditions</b></span>: the library must be built
|
||||
<span class="bold"><strong>Preconditions</strong></span>: the library must be built
|
||||
and used with BOOST_REGEX_MATCH_EXTRA defined, and you must pass the flag
|
||||
match_extra to the regex matching functions ( <a href="regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> or <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a>) in order for
|
||||
match_extra to the regex matching functions ( <a href="regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>) in order for
|
||||
this member function to be defined and return useful information.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Rationale</b></span>: Enabling this feature has several
|
||||
<span class="bold"><strong>Rationale</strong></span>: Enabling this feature has several
|
||||
consequences:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
@ -584,57 +563,54 @@
|
||||
</ul></div>
|
||||
<a name="boost_regex.match_results.op_eq"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">==</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m1</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Compares the two sequences for
|
||||
<span class="bold"><strong>Effects</strong></span>: Compares the two sequences for
|
||||
equality.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.op_ne"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span> <span class="special">!=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m1</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Compares the two sequences for
|
||||
<span class="bold"><strong>Effects</strong></span>: Compares the two sequences for
|
||||
inequality.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.op_stream"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span>
|
||||
<span class="keyword">operator</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">basic_ostream</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">os</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Writes the contents of <span class="emphasis"><em>m</em></span>
|
||||
to the stream <span class="emphasis"><em>os</em></span> as if by calling <tt class="computeroutput"><span class="identifier">os</span>
|
||||
<span class="special"><<</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></tt>;
|
||||
<span class="bold"><strong>Effects</strong></span>: Writes the contents of <span class="emphasis"><em>m</em></span>
|
||||
to the stream <span class="emphasis"><em>os</em></span> as if by calling <code class="computeroutput"><span class="identifier">os</span>
|
||||
<span class="special"><<</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code>;
|
||||
Returns <span class="emphasis"><em>os</em></span>.
|
||||
</p>
|
||||
<a name="boost_regex.match_results.op_swap"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m1</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Swaps the contents of the two sequences.
|
||||
<span class="bold"><strong>Effects</strong></span>: Swaps the contents of the two sequences.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Interfacing With Non-Standard
|
||||
String Types</title>
|
||||
<title>Interfacing With Non-Standard String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="regex_traits.html" title=" regex_traits">
|
||||
<link rel="next" href="non_std_strings/icu.html" title=" Working With
|
||||
Unicode and ICU String Types">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_traits.html" title="regex_traits">
|
||||
<link rel="next" href="non_std_strings/icu.html" title="Working With Unicode and ICU String Types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings"></a><a href="non_std_strings.html" title=" Interfacing With Non-Standard
|
||||
String Types"> Interfacing With Non-Standard
|
||||
String Types</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings"></a><a href="non_std_strings.html" title="Interfacing With Non-Standard String Types"> Interfacing With Non-Standard
|
||||
String Types</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="non_std_strings/icu.html"> Working With
|
||||
Unicode and ICU String Types</a></span></dt>
|
||||
@ -72,15 +70,14 @@
|
||||
been provided for them already: currently this includes the ICU and MFC string
|
||||
class types.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Working With
|
||||
Unicode and ICU String Types</title>
|
||||
<title>Working With Unicode and ICU String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../non_std_strings.html" title=" Interfacing With Non-Standard
|
||||
String Types">
|
||||
<link rel="prev" href="../non_std_strings.html" title=" Interfacing With Non-Standard
|
||||
String Types">
|
||||
<link rel="next" href="icu/intro.html" title=" Introduction
|
||||
to using Regex with ICU">
|
||||
<link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
<link rel="prev" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
<link rel="next" href="icu/intro.html" title="Introduction to using Regex with ICU">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu"></a><a href="icu.html" title=" Working With
|
||||
Unicode and ICU String Types"> Working With
|
||||
Unicode and ICU String Types</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.icu"></a><a href="icu.html" title="Working With Unicode and ICU String Types"> Working With
|
||||
Unicode and ICU String Types</a>
|
||||
</h4></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="icu/intro.html"> Introduction
|
||||
to using Regex with ICU</a></span></dt>
|
||||
@ -44,10 +40,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Introduction
|
||||
to using Regex with ICU</title>
|
||||
<title>Introduction to using Regex with ICU</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title=" Working With
|
||||
Unicode and ICU String Types">
|
||||
<link rel="prev" href="../icu.html" title=" Working With
|
||||
Unicode and ICU String Types">
|
||||
<link rel="next" href="unicode_types.html" title="
|
||||
Unicode regular expression types">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="next" href="unicode_types.html" title="Unicode regular expression types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,14 +24,13 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.intro"></a><a href="intro.html" title=" Introduction
|
||||
to using Regex with ICU"> Introduction
|
||||
to using Regex with ICU</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.intro"></a><a href="intro.html" title="Introduction to using Regex with ICU"> Introduction
|
||||
to using Regex with ICU</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
The header:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
contains the data types and algorithms necessary for working with regular
|
||||
@ -67,10 +62,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Unicode Regular Expression Algorithms</title>
|
||||
<title>Unicode Regular Expression Algorithms</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title=" Working With
|
||||
Unicode and ICU String Types">
|
||||
<link rel="prev" href="unicode_types.html" title="
|
||||
Unicode regular expression types">
|
||||
<link rel="next" href="unicode_iter.html" title="
|
||||
Unicode Aware Regex Iterators">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="unicode_types.html" title="Unicode regular expression types">
|
||||
<link rel="next" href="unicode_iter.html" title="Unicode Aware Regex Iterators">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,41 +24,40 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo"></a><a href="unicode_algo.html" title="
|
||||
Unicode Regular Expression Algorithms">
|
||||
Unicode Regular Expression Algorithms</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo"></a><a href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
|
||||
Unicode Regular Expression Algorithms</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
The regular expression algorithms <a href="../../regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>, <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> and <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> all expect that
|
||||
The regular expression algorithms <a href="../../regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>, <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> and <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> all expect that
|
||||
the character sequence upon which they operate, is encoded in the same
|
||||
character encoding as the regular expression object with which they are
|
||||
used. For Unicode regular expressions that behavior is undesirable: while
|
||||
we may want to process the data in UTF-32 "chunks", the actual
|
||||
data is much more likely to encoded as either UTF-8 or UTF-16. Therefore
|
||||
the header <boost/regex/icu.hpp> provides a series of thin wrappers
|
||||
around these algorithms, called <tt class="computeroutput"><span class="identifier">u32regex_match</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">u32regex_search</span></tt>, and
|
||||
<tt class="computeroutput"><span class="identifier">u32regex_replace</span></tt>. These
|
||||
around these algorithms, called <code class="computeroutput"><span class="identifier">u32regex_match</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">u32regex_search</span></code>, and
|
||||
<code class="computeroutput"><span class="identifier">u32regex_replace</span></code>. These
|
||||
wrappers use iterator-adapters internally to make external UTF-8 or UTF-16
|
||||
data look as though it's really a UTF-32 sequence, that can then be passed
|
||||
on to the "real" algorithm.
|
||||
</p>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h4>
|
||||
<a name="id572213"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match"></a><h5>
|
||||
<a name="id615144"></a>
|
||||
<a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_match">u32regex_match</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
For each <a href="../../regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>
|
||||
algorithm defined by <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>,
|
||||
then <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt> defines an overloaded algorithm that
|
||||
takes the same arguments, but which is called <tt class="computeroutput"><span class="identifier">u32regex_match</span></tt>,
|
||||
For each <a href="../../regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
|
||||
algorithm defined by <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>,
|
||||
then <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> defines an overloaded algorithm that
|
||||
takes the same arguments, but which is called <code class="computeroutput"><span class="identifier">u32regex_match</span></code>,
|
||||
and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as
|
||||
an ICU UnicodeString as input.
|
||||
</p>
|
||||
<p>
|
||||
Example: match a password, encoded in a UTF-16 UnicodeString:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">//
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Find out if *password* meets our password requirements,
|
||||
</span><span class="comment">// as defined by the regular expression *requirements*.
|
||||
</span><span class="comment">//
|
||||
@ -74,8 +69,7 @@
|
||||
<p>
|
||||
Example: match a UTF-8 encoded filename:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">//
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Extract filename part of a path from a UTF-8 encoded std::string and return the result
|
||||
</span><span class="comment">// as another std::string:
|
||||
</span><span class="comment">//
|
||||
@ -94,23 +88,22 @@
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h4>
|
||||
<a name="id572936"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search"></a><h5>
|
||||
<a name="id615863"></a>
|
||||
<a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_search">u32regex_search</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
For each <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>
|
||||
algorithm defined by <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>,
|
||||
then <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt> defines an overloaded algorithm that
|
||||
takes the same arguments, but which is called <tt class="computeroutput"><span class="identifier">u32regex_search</span></tt>,
|
||||
For each <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
|
||||
algorithm defined by <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>,
|
||||
then <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> defines an overloaded algorithm that
|
||||
takes the same arguments, but which is called <code class="computeroutput"><span class="identifier">u32regex_search</span></code>,
|
||||
and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as
|
||||
an ICU UnicodeString as input.
|
||||
</p>
|
||||
<p>
|
||||
Example: search for a character sequence in a specific language block:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">UnicodeString</span> <span class="identifier">extract_greek</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="identifier">UnicodeString</span> <span class="identifier">extract_greek</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// searches through some UTF-16 encoded text for a block encoded in Greek,
|
||||
</span> <span class="comment">// this expression is imperfect, but the best we can do for now - searching
|
||||
@ -134,15 +127,15 @@
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h4>
|
||||
<a name="id573532"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace"></a><h5>
|
||||
<a name="id616456"></a>
|
||||
<a href="unicode_algo.html#boost_regex.ref.non_std_strings.icu.unicode_algo.u32regex_replace">u32regex_replace</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
For each <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> algorithm defined
|
||||
by <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>, then <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
|
||||
For each <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> algorithm defined
|
||||
by <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>, then <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
defines an overloaded algorithm that takes the same arguments, but which
|
||||
is called <tt class="computeroutput"><span class="identifier">u32regex_replace</span></tt>,
|
||||
is called <code class="computeroutput"><span class="identifier">u32regex_replace</span></code>,
|
||||
and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as
|
||||
an ICU UnicodeString as input. The input sequence and the format string
|
||||
specifier passed to the algorithm, can be encoded independently (for
|
||||
@ -153,8 +146,7 @@
|
||||
<p>
|
||||
Example: Credit card number reformatting:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">//
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Take a credit card number as a string of digits,
|
||||
</span><span class="comment">// and reformat it as a human readable string with "-"
|
||||
</span><span class="comment">// separating each group of four digit;,
|
||||
@ -174,10 +166,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Unicode Aware Regex Iterators</title>
|
||||
<title>Unicode Aware Regex Iterators</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title=" Working With
|
||||
Unicode and ICU String Types">
|
||||
<link rel="prev" href="unicode_algo.html" title="
|
||||
Unicode Regular Expression Algorithms">
|
||||
<link rel="next" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
|
||||
<link rel="next" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,23 +24,22 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter"></a><a href="unicode_iter.html" title="
|
||||
Unicode Aware Regex Iterators">
|
||||
Unicode Aware Regex Iterators</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h4>
|
||||
<a name="id573998"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter"></a><a href="unicode_iter.html" title="Unicode Aware Regex Iterators">
|
||||
Unicode Aware Regex Iterators</a>
|
||||
</h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator"></a><h5>
|
||||
<a name="id616916"></a>
|
||||
<a href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_iterator">u32regex_iterator</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Type <tt class="computeroutput"><span class="identifier">u32regex_iterator</span></tt>
|
||||
is in all respects the same as <a href="../../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> except that since
|
||||
the regular expression type is always <tt class="computeroutput"><span class="identifier">u32regex</span></tt>
|
||||
Type <code class="computeroutput"><span class="identifier">u32regex_iterator</span></code>
|
||||
is in all respects the same as <a href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> except that since
|
||||
the regular expression type is always <code class="computeroutput"><span class="identifier">u32regex</span></code>
|
||||
it only takes one template parameter (the iterator type). It also calls
|
||||
<tt class="computeroutput"><span class="identifier">u32regex_search</span></tt> internally,
|
||||
<code class="computeroutput"><span class="identifier">u32regex_search</span></code> internally,
|
||||
allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u32regex_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// for members see regex_iterator
|
||||
@ -55,12 +50,11 @@
|
||||
<span class="keyword">typedef</span> <span class="identifier">u32regex_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">UChar32</span><span class="special">*></span> <span class="identifier">utf32regex_iterator</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
In order to simplify the construction of a <tt class="computeroutput"><span class="identifier">u32regex_iterator</span></tt>
|
||||
In order to simplify the construction of a <code class="computeroutput"><span class="identifier">u32regex_iterator</span></code>
|
||||
from a string, there are a series of non-member helper functions called
|
||||
make_u32regex_iterator:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<span class="identifier">make_u32regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
@ -95,8 +89,7 @@
|
||||
Example: search for international currency symbols, along with their
|
||||
associated numeric value:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">void</span> <span class="identifier">enumerate_currencies</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_currencies</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the currency symbols, along
|
||||
</span> <span class="comment">// with any associated numeric values:
|
||||
@ -132,20 +125,19 @@
|
||||
<p>
|
||||
Provided of course that the input is encoded as UTF-8.
|
||||
</p>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h4>
|
||||
<a name="id575751"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator"></a><h5>
|
||||
<a name="id618662"></a>
|
||||
<a href="unicode_iter.html#boost_regex.ref.non_std_strings.icu.unicode_iter.u32regex_token_iterator">u32regex_token_iterator</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Type <tt class="computeroutput"><span class="identifier">u32regex_token_iterator</span></tt>
|
||||
is in all respects the same as <a href="../../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> except
|
||||
that since the regular expression type is always <tt class="computeroutput"><span class="identifier">u32regex</span></tt>
|
||||
Type <code class="computeroutput"><span class="identifier">u32regex_token_iterator</span></code>
|
||||
is in all respects the same as <a href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> except
|
||||
that since the regular expression type is always <code class="computeroutput"><span class="identifier">u32regex</span></code>
|
||||
it only takes one template parameter (the iterator type). It also calls
|
||||
<tt class="computeroutput"><span class="identifier">u32regex_search</span></tt> internally,
|
||||
<code class="computeroutput"><span class="identifier">u32regex_search</span></code> internally,
|
||||
allowing it to interface correctly with UTF-8, UTF-16, and UTF-32 data:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">u32regex_token_iterator</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// for members see regex_token_iterator
|
||||
@ -156,12 +148,11 @@
|
||||
<span class="keyword">typedef</span> <span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">UChar32</span><span class="special">*></span> <span class="identifier">utf32regex_token_iterator</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
In order to simplify the construction of a <tt class="computeroutput"><span class="identifier">u32regex_token_iterator</span></tt>
|
||||
In order to simplify the construction of a <code class="computeroutput"><span class="identifier">u32regex_token_iterator</span></code>
|
||||
from a string, there are a series of non-member helper functions called
|
||||
<tt class="computeroutput"><span class="identifier">make_u32regex_token_iterator</span></tt>:
|
||||
<code class="computeroutput"><span class="identifier">make_u32regex_token_iterator</span></code>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
@ -202,8 +193,7 @@
|
||||
of marked sub-expression sub in regular expression <span class="emphasis"><em>e</em></span>,
|
||||
found in text <span class="emphasis"><em>s</em></span>, using match_flags <span class="emphasis"><em>m</em></span>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
@ -248,8 +238,7 @@
|
||||
for each submatch in regular expression <span class="emphasis"><em>e</em></span>, found
|
||||
in text <span class="emphasis"><em>s</em></span>, using match_flags <span class="emphasis"><em>m</em></span>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*></span>
|
||||
<span class="identifier">make_u32regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">u32regex</span><span class="special">&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
@ -294,8 +283,7 @@
|
||||
Example: search for international currency symbols, along with their
|
||||
associated numeric value:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">void</span> <span class="identifier">enumerate_currencies2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_currencies2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">text</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the currency symbols, along
|
||||
</span> <span class="comment">// with any associated numeric values:
|
||||
@ -321,10 +309,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Unicode regular expression types</title>
|
||||
<title>Unicode regular expression types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../icu.html" title=" Working With
|
||||
Unicode and ICU String Types">
|
||||
<link rel="prev" href="intro.html" title=" Introduction
|
||||
to using Regex with ICU">
|
||||
<link rel="next" href="unicode_algo.html" title="
|
||||
Unicode Regular Expression Algorithms">
|
||||
<link rel="up" href="../icu.html" title="Working With Unicode and ICU String Types">
|
||||
<link rel="prev" href="intro.html" title="Introduction to using Regex with ICU">
|
||||
<link rel="next" href="unicode_algo.html" title="Unicode Regular Expression Algorithms">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,113 +24,105 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_types"></a><a href="unicode_types.html" title="
|
||||
Unicode regular expression types">
|
||||
Unicode regular expression types</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.icu.unicode_types"></a><a href="unicode_types.html" title="Unicode regular expression types">
|
||||
Unicode regular expression types</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
Header <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt> provides a regular expression traits
|
||||
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">icu</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> provides a regular expression traits
|
||||
class that handles UTF-32 characters:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">class</span> <span class="identifier">icu_regex_traits</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">icu_regex_traits</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
and a regular expression type based upon that:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">UChar32</span><span class="special">,</span><span class="identifier">icu_regex_traits</span><span class="special">></span> <span class="identifier">u32regex</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">UChar32</span><span class="special">,</span><span class="identifier">icu_regex_traits</span><span class="special">></span> <span class="identifier">u32regex</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
The type <tt class="computeroutput"><span class="identifier">u32regex</span></tt> is
|
||||
The type <code class="computeroutput"><span class="identifier">u32regex</span></code> is
|
||||
regular expression type to use for all Unicode regular expressions; internally
|
||||
it uses UTF-32 code points, but can be created from, and used to search,
|
||||
either UTF-8, or UTF-16 encoded strings as well as UTF-32 ones.
|
||||
</p>
|
||||
<p>
|
||||
The constructors, and assign member functions of <tt class="computeroutput"><span class="identifier">u32regex</span></tt>,
|
||||
The constructors, and assign member functions of <code class="computeroutput"><span class="identifier">u32regex</span></code>,
|
||||
require UTF-32 encoded strings, but there are a series of overloaded
|
||||
algorithms called <tt class="computeroutput"><span class="identifier">make_u32regex</span></tt>
|
||||
algorithms called <code class="computeroutput"><span class="identifier">make_u32regex</span></code>
|
||||
which allow regular expressions to be created from UTF-8, UTF-16, or
|
||||
UTF-32 encoded strings:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">InputIterator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">InputIterator</span><span class="special">></span>
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="identifier">InputIterator</span> <span class="identifier">i</span><span class="special">,</span>
|
||||
<span class="identifier">InputIterator</span> <span class="identifier">j</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the iterator sequence [i,j). The character encoding of the
|
||||
sequence is determined based upon sizeof(*i): 1 implies UTF-8, 2 implies
|
||||
UTF-16, and 4 implies UTF-32.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
|
||||
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the Null-terminated UTF-8 characater sequence <span class="emphasis"><em>p</em></span>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
|
||||
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the Null-terminated UTF-8 characater sequence p.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
|
||||
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the Null-terminated characater sequence p. The character
|
||||
encoding of the sequence is determined based upon sizeof(wchar_t): 1
|
||||
implies UTF-8, 2 implies UTF-16, and 4 implies UTF-32.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UChar</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UChar</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
|
||||
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the Null-terminated UTF-16 characater sequence p.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">C</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
|
||||
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the string s. The character encoding of the string is determined
|
||||
based upon sizeof(C): 1 implies UTF-8, 2 implies UTF-16, and 4 implies
|
||||
UTF-32.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">u32regex</span> <span class="identifier">make_u32regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">UnicodeString</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">opt</span>
|
||||
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">perl</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Creates a regular expression
|
||||
<span class="bold"><strong>Effects</strong></span>: Creates a regular expression
|
||||
object from the UTF-16 encoding string s.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Using
|
||||
Boost Regex With MFC Strings</title>
|
||||
<title>Using Boost Regex With MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../non_std_strings.html" title=" Interfacing With Non-Standard
|
||||
String Types">
|
||||
<link rel="prev" href="icu/unicode_iter.html" title="
|
||||
Unicode Aware Regex Iterators">
|
||||
<link rel="next" href="mfc_strings/mfc_intro.html" title="
|
||||
Introduction to Boost.Regex and MFC Strings">
|
||||
<link rel="up" href="../non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
<link rel="prev" href="icu/unicode_iter.html" title="Unicode Aware Regex Iterators">
|
||||
<link rel="next" href="mfc_strings/mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings"></a><a href="mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings"> Using
|
||||
Boost Regex With MFC Strings</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings"></a><a href="mfc_strings.html" title="Using Boost Regex With MFC Strings"> Using
|
||||
Boost Regex With MFC Strings</a>
|
||||
</h4></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="mfc_strings/mfc_intro.html">
|
||||
Introduction to Boost.Regex and MFC Strings</a></span></dt>
|
||||
@ -46,10 +42,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Overloaded Algorithms For MFC String Types</title>
|
||||
<title>Overloaded Algorithms For MFC String Types</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_regex_create.html" title="
|
||||
Regular Expression Creation From an MFC String">
|
||||
<link rel="next" href="mfc_iter.html" title="
|
||||
Iterating Over the Matches Within An MFC String">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
|
||||
<link rel="next" href="mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,31 +24,30 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo"></a><a href="mfc_algo.html" title="
|
||||
Overloaded Algorithms For MFC String Types">
|
||||
Overloaded Algorithms For MFC String Types</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo"></a><a href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
|
||||
Overloaded Algorithms For MFC String Types</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
For each regular expression algorithm that's overloaded for a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt> argument, there is also
|
||||
For each regular expression algorithm that's overloaded for a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code> argument, there is also
|
||||
one overloaded for the MFC/ATL string types. These algorithm signatures
|
||||
all look a lot more complex than they actually are, but for completeness
|
||||
here they are anyway:
|
||||
</p>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h4>
|
||||
<a name="id580927"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match"></a><h5>
|
||||
<a name="id623819"></a>
|
||||
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match">regex_match</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
There are two overloads, the first reports what matched in a match_results
|
||||
structure, the second does not.
|
||||
</p>
|
||||
<p>
|
||||
All the usual caveats for <a href="../../regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a> apply, in particular
|
||||
All the usual caveats for <a href="../../regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a> apply, in particular
|
||||
the algorithm will only report a successful match if all of the input
|
||||
text matches the expression, if this isn't what you want then use <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>
|
||||
text matches the expression, if this isn't what you want then use <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>
|
||||
instead.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">B</span><span class="special">*,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">what</span><span class="special">,</span>
|
||||
@ -60,15 +55,14 @@
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span>
|
||||
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example:</b></span>
|
||||
<span class="bold"><strong>Example:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">//
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Extract filename part of a path from a CString and return the result
|
||||
</span><span class="comment">// as another CString:
|
||||
</span><span class="comment">//
|
||||
@ -87,28 +81,26 @@
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h4>
|
||||
<a name="id581844"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_"></a><h5>
|
||||
<a name="id624731"></a>
|
||||
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_match__second_overload_">regex_match
|
||||
(second overload)</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">B</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span>
|
||||
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example:</b></span>
|
||||
<span class="bold"><strong>Example:</strong></span>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">//
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Find out if *password* meets our password requirements,
|
||||
</span><span class="comment">// as defined by the regular expression *requirements*.
|
||||
</span><span class="comment">//
|
||||
@ -117,31 +109,29 @@
|
||||
<span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">password</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_regex</span><span class="special">(</span><span class="identifier">requirements</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h4>
|
||||
<a name="id582440"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search"></a><h5>
|
||||
<a name="id625322"></a>
|
||||
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search">regex_search</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
There are two additional overloads for <a href="../../regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>, the first reports
|
||||
There are two additional overloads for <a href="../../regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>, the first reports
|
||||
what matched the second does not:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">A</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">A</span><span class="special">>&</span> <span class="identifier">what</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns ::boost::regex_search(s.GetString(),
|
||||
<span class="bold"><strong>Effects</strong></span>: returns ::boost::regex_search(s.GetString(),
|
||||
s.GetString() + s.GetLength(), what, e, f);
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example</b></span>: Postcode extraction from an
|
||||
<span class="bold"><strong>Example</strong></span>: Postcode extraction from an
|
||||
address string.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">CString</span> <span class="identifier">extract_postcode</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">address</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="identifier">CString</span> <span class="identifier">extract_postcode</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">address</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// searches throw address for a UK postcode and returns the result,
|
||||
</span> <span class="comment">// the expression used is by Phil A. on www.regxlib.com:
|
||||
@ -158,32 +148,30 @@
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h4>
|
||||
<a name="id583183"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_"></a><h5>
|
||||
<a name="id626060"></a>
|
||||
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_search__second_overload_">regex_search
|
||||
(second overload)</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">inline</span> <span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span>
|
||||
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h4>
|
||||
<a name="id583590"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace"></a><h5>
|
||||
<a name="id626464"></a>
|
||||
<a href="mfc_algo.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_algo.regex_replace">regex_replace</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
There are two additional overloads for <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>, the first sends
|
||||
There are two additional overloads for <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>, the first sends
|
||||
output to an output iterator, while the second creates a new string
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span>
|
||||
<span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span>
|
||||
@ -193,26 +181,24 @@
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="identifier">flags</span><span class="special">);</span></tt>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span>
|
||||
<span class="identifier">flags</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns a new string created
|
||||
using <a href="../../regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a>,
|
||||
<span class="bold"><strong>Effects</strong></span>: returns a new string created
|
||||
using <a href="../../regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a>,
|
||||
and the same memory manager as string <span class="emphasis"><em>s</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example</b></span>:
|
||||
<span class="bold"><strong>Example</strong></span>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">//
|
||||
<pre class="programlisting"><span class="comment">//
|
||||
</span><span class="comment">// Take a credit card number as a string of digits,
|
||||
</span><span class="comment">// and reformat it as a human readable string with "-"
|
||||
</span><span class="comment">// separating each group of four digits:
|
||||
@ -228,10 +214,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Introduction to Boost.Regex and MFC Strings</title>
|
||||
<title>Introduction to Boost.Regex and MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="next" href="mfc_regex_types.html" title="
|
||||
Regex Types Used With MFC Strings">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="next" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,11 +24,11 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_intro"></a><a href="mfc_intro.html" title="
|
||||
Introduction to Boost.Regex and MFC Strings">
|
||||
Introduction to Boost.Regex and MFC Strings</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_intro"></a><a href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
|
||||
Introduction to Boost.Regex and MFC Strings</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
The header <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">mfc</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt> provides Boost.Regex support for
|
||||
The header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">/</span><span class="identifier">mfc</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> provides Boost.Regex support for
|
||||
MFC string types: note that this support requires Visual Studio .NET
|
||||
(Visual C++ 7) or later, where all of the MFC and ATL string types are
|
||||
based around the CSimpleStringT class template.
|
||||
@ -42,8 +38,7 @@
|
||||
then you can substitute any of the following MFC/ATL types (all of which
|
||||
inherit from CSimpleStringT):
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">CString</span>
|
||||
<pre class="programlisting"><span class="identifier">CString</span>
|
||||
<span class="identifier">CStringA</span>
|
||||
<span class="identifier">CStringW</span>
|
||||
<span class="identifier">CAtlString</span>
|
||||
@ -56,10 +51,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Iterating Over the Matches Within An MFC String</title>
|
||||
<title>Iterating Over the Matches Within An MFC String</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_algo.html" title="
|
||||
Overloaded Algorithms For MFC String Types">
|
||||
<link rel="next" href="../../posix.html" title=" POSIX Compatible C API's">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
|
||||
<link rel="next" href="../../posix.html" title="POSIX Compatible C API's">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,20 +24,19 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter"></a><a href="mfc_iter.html" title="
|
||||
Iterating Over the Matches Within An MFC String">
|
||||
Iterating Over the Matches Within An MFC String</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter"></a><a href="mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
|
||||
Iterating Over the Matches Within An MFC String</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
The following helper functions are provided to ease the conversion from
|
||||
an MFC/ATL string to a <a href="../../regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> or <a href="../../regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a>:
|
||||
an MFC/ATL string to a <a href="../../regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> or <a href="../../regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a>:
|
||||
</p>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h4>
|
||||
<a name="id584678"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper"></a><h5>
|
||||
<a name="id627545"></a>
|
||||
<a href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_iterator_creation_helper">regex_iterator
|
||||
creation helper</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">regex_iterator</span><span class="special"><</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*></span>
|
||||
<span class="identifier">make_regex_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
@ -48,15 +44,14 @@
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example</b></span>:
|
||||
<span class="bold"><strong>Example</strong></span>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">void</span> <span class="identifier">enumerate_links</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">html</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_links</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">html</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the links in some HTML text,
|
||||
</span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com:
|
||||
@ -72,13 +67,12 @@
|
||||
<span class="special">}</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h4>
|
||||
<a name="id585433"></a>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers"></a><h5>
|
||||
<a name="id628294"></a>
|
||||
<a href="mfc_iter.html#boost_regex.ref.non_std_strings.mfc_strings.mfc_iter.regex_token_iterator_creation_helpers">regex_token_iterator
|
||||
creation helpers</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">regex_token_iterator</span><span class="special"><</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*></span>
|
||||
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
@ -87,13 +81,12 @@
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">sub</span><span class="special">,</span>
|
||||
<span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">regex_token_iterator</span><span class="special"><</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*></span>
|
||||
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
@ -102,13 +95,12 @@
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">subs</span><span class="special">,</span>
|
||||
<span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<span class="identifier">regex_token_iterator</span><span class="special"><</span><span class="identifier">charT</span> <span class="keyword">const</span><span class="special">*></span>
|
||||
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
@ -117,16 +109,15 @@
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">subs</span><span class="special">,</span>
|
||||
<span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Example</b></span>:
|
||||
<span class="bold"><strong>Example</strong></span>:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">void</span> <span class="identifier">enumerate_links2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">html</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">enumerate_links2</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">CString</span><span class="special">&</span> <span class="identifier">html</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="comment">// enumerate and print all the links in some HTML text,
|
||||
</span> <span class="comment">// the expression used is by Andew Lee on www.regxlib.com:
|
||||
@ -145,10 +136,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Regular Expression Creation From an MFC String</title>
|
||||
<title>Regular Expression Creation From an MFC String</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_regex_types.html" title="
|
||||
Regex Types Used With MFC Strings">
|
||||
<link rel="next" href="mfc_algo.html" title="
|
||||
Overloaded Algorithms For MFC String Types">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
|
||||
<link rel="next" href="mfc_algo.html" title="Overloaded Algorithms For MFC String Types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,30 +24,30 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_create"></a><a href="mfc_regex_create.html" title="
|
||||
Regular Expression Creation From an MFC String">
|
||||
Regular Expression Creation From an MFC String</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_create"></a><a href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
|
||||
Regular Expression Creation From an MFC String</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
The following helper function is available to assist in the creation
|
||||
of a regular expression from an MFC/ATL string type:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">make_regex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ATL</span><span class="special">::</span><span class="identifier">CSimpleStringT</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">normal</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="identifier">f</span><span class="special">);</span></tt>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetString</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">GetLength</span><span class="special">(),</span>
|
||||
<span class="identifier">f</span><span class="special">);</span></code>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Regex Types Used With MFC Strings</title>
|
||||
<title>Regex Types Used With MFC Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../mfc_strings.html" title=" Using
|
||||
Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_intro.html" title="
|
||||
Introduction to Boost.Regex and MFC Strings">
|
||||
<link rel="next" href="mfc_regex_create.html" title="
|
||||
Regular Expression Creation From an MFC String">
|
||||
<link rel="up" href="../mfc_strings.html" title="Using Boost Regex With MFC Strings">
|
||||
<link rel="prev" href="mfc_intro.html" title="Introduction to Boost.Regex and MFC Strings">
|
||||
<link rel="next" href="mfc_regex_create.html" title="Regular Expression Creation From an MFC String">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,31 +24,31 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_types"></a><a href="mfc_regex_types.html" title="
|
||||
Regex Types Used With MFC Strings">
|
||||
Regex Types Used With MFC Strings</a></h5></div></div></div>
|
||||
<a name="boost_regex.ref.non_std_strings.mfc_strings.mfc_regex_types"></a><a href="mfc_regex_types.html" title="Regex Types Used With MFC Strings">
|
||||
Regex Types Used With MFC Strings</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
The following typedefs are provided for the convenience of those working
|
||||
with TCHAR's:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">TCHAR</span><span class="special">></span> <span class="identifier">tregex</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">TCHAR</span><span class="special">></span> <span class="identifier">tregex</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">match_results</span><span class="special"><</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*></span> <span class="identifier">tmatch</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">regex_iterator</span><span class="special"><</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*></span> <span class="identifier">tregex_iterator</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">regex_token_iterator</span><span class="special"><</span><span class="identifier">TCHAR</span> <span class="keyword">const</span><span class="special">*></span> <span class="identifier">tregex_token_iterator</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
If you are working with explicitly narrow or wide characters rather than
|
||||
TCHAR, then use the regular Boost.Regex types <tt class="computeroutput"><span class="identifier">regex</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">wregex</span></tt> instead.
|
||||
TCHAR, then use the regular Boost.Regex types <code class="computeroutput"><span class="identifier">regex</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">wregex</span></code> instead.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> POSIX Compatible C API's</title>
|
||||
<title>POSIX Compatible C API's</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="
|
||||
Iterating Over the Matches Within An MFC String">
|
||||
<link rel="next" href="concepts.html" title=" Concepts">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
|
||||
<link rel="next" href="concepts.html" title="Concepts">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,13 +24,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.posix"></a><a href="posix.html" title=" POSIX Compatible C API's"> POSIX Compatible C API's</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.posix"></a><a href="posix.html" title="POSIX Compatible C API's"> POSIX Compatible C API's</a>
|
||||
</h3></div></div></div>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
this is an abridged reference to the POSIX API functions, these are provided
|
||||
for compatibility with other libraries, rather than as an API to be used
|
||||
in new code (unless you need access from a language other than C++). This
|
||||
@ -39,14 +39,12 @@
|
||||
as the names used are macros that expand to the actual function names.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
or:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The following functions are available for users who need a POSIX compatible
|
||||
@ -59,9 +57,9 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
|
||||
<th align="left">Important</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
Note that all the symbols defined here are enclosed inside namespace <tt class="computeroutput"><span class="identifier">boost</span></tt> when used in C++ programs, unless
|
||||
you use <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></tt>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
Note that all the symbols defined here are enclosed inside namespace <code class="computeroutput"><span class="identifier">boost</span></code> when used in C++ programs, unless
|
||||
you use <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||||
instead - in which case the symbols are still defined in namespace boost,
|
||||
but are made available in the global namespace as well.
|
||||
</p></td></tr>
|
||||
@ -69,8 +67,7 @@
|
||||
<p>
|
||||
The functions are defined as:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">extern</span> <span class="string">"C"</span> <span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">extern</span> <span class="string">"C"</span> <span class="special">{</span>
|
||||
|
||||
<span class="keyword">struct</span> <span class="identifier">regex_tA</span><span class="special">;</span>
|
||||
<span class="keyword">struct</span> <span class="identifier">regex_tW</span><span class="special">;</span>
|
||||
@ -125,13 +122,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">re_nsub</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
|
||||
<span class="identifier">re_nsub</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
This is filled in by <tt class="computeroutput"><span class="identifier">regcomp</span></tt>
|
||||
This is filled in by <code class="computeroutput"><span class="identifier">regcomp</span></code>
|
||||
and indicates the number of sub-expressions contained in the regular
|
||||
expression.
|
||||
</p>
|
||||
@ -140,7 +137,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">TCHAR</span><span class="special">*</span> <span class="identifier">re_endp</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">TCHAR</span><span class="special">*</span> <span class="identifier">re_endp</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -157,23 +154,23 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
<tt class="computeroutput"><span class="identifier">regex_t</span></tt> is actually a
|
||||
<tt class="computeroutput"><span class="preprocessor">#define</span></tt> - it is either
|
||||
<tt class="computeroutput"><span class="identifier">regex_tA</span></tt> or <tt class="computeroutput"><span class="identifier">regex_tW</span></tt> depending upon whether <tt class="computeroutput"><span class="identifier">UNICODE</span></tt> is defined or not, <tt class="computeroutput"><span class="identifier">TCHAR</span></tt> is either <tt class="computeroutput"><span class="keyword">char</span></tt>
|
||||
or <tt class="computeroutput"><span class="keyword">wchar_t</span></tt> again depending
|
||||
upon the macro <tt class="computeroutput"><span class="identifier">UNICODE</span></tt>.
|
||||
<tr><td align="left" valign="top"><p>
|
||||
<code class="computeroutput"><span class="identifier">regex_t</span></code> is actually a
|
||||
<code class="computeroutput"><span class="preprocessor">#define</span></code> - it is either
|
||||
<code class="computeroutput"><span class="identifier">regex_tA</span></code> or <code class="computeroutput"><span class="identifier">regex_tW</span></code> depending upon whether <code class="computeroutput"><span class="identifier">UNICODE</span></code> is defined or not, <code class="computeroutput"><span class="identifier">TCHAR</span></code> is either <code class="computeroutput"><span class="keyword">char</span></code>
|
||||
or <code class="computeroutput"><span class="keyword">wchar_t</span></code> again depending
|
||||
upon the macro <code class="computeroutput"><span class="identifier">UNICODE</span></code>.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="regcomp"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.ref.posix.regcomp"></a><h4>
|
||||
<a name="id588362"></a>
|
||||
<a name="boost_regex.ref.posix.regcomp"></a><h5>
|
||||
<a name="id631211"></a>
|
||||
<a href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">regcomp</span></tt> takes a pointer to
|
||||
a <tt class="computeroutput"><span class="identifier">regex_t</span></tt>, a pointer to the
|
||||
<code class="computeroutput"><span class="identifier">regcomp</span></code> takes a pointer to
|
||||
a <code class="computeroutput"><span class="identifier">regex_t</span></code>, a pointer to the
|
||||
expression to compile and a flags parameter which can be a combination of:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -202,9 +199,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Compiles modern regular expressions. Equivalent to <tt class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
|
||||
Compiles modern regular expressions. Equivalent to <code class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></tt>.
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -217,12 +214,12 @@
|
||||
<td>
|
||||
<p>
|
||||
Compiles basic (obsolete) regular expression syntax. Equivalent to
|
||||
<tt class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
|
||||
<code class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">limited_ops</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_braces</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_parens</span> <span class="special">|</span>
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></tt>.
|
||||
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -346,8 +343,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
A shortcut for awk-like behavior: <tt class="computeroutput"><span class="identifier">REG_EXTENDED</span>
|
||||
<span class="special">|</span> <span class="identifier">REG_ESCAPE_IN_LISTS</span></tt>
|
||||
A shortcut for awk-like behavior: <code class="computeroutput"><span class="identifier">REG_EXTENDED</span>
|
||||
<span class="special">|</span> <span class="identifier">REG_ESCAPE_IN_LISTS</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -359,8 +356,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
A shortcut for grep like behavior: <tt class="computeroutput"><span class="identifier">REG_BASIC</span>
|
||||
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></tt>
|
||||
A shortcut for grep like behavior: <code class="computeroutput"><span class="identifier">REG_BASIC</span>
|
||||
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -372,8 +369,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
A shortcut for egrep like behavior: <tt class="computeroutput"><span class="identifier">REG_EXTENDED</span>
|
||||
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></tt>
|
||||
A shortcut for egrep like behavior: <code class="computeroutput"><span class="identifier">REG_EXTENDED</span>
|
||||
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -381,10 +378,10 @@
|
||||
</table></div>
|
||||
<a name="regerror"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.ref.posix.regerror"></a><h4>
|
||||
<a name="id589006"></a>
|
||||
<a name="boost_regex.ref.posix.regerror"></a><h5>
|
||||
<a name="id631855"></a>
|
||||
<a href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
regerror takes the following parameters, it maps an error code to a human
|
||||
readable string:
|
||||
@ -469,10 +466,10 @@
|
||||
</p>
|
||||
<a name="regexec"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.ref.posix.regexec"></a><h4>
|
||||
<a name="id589189"></a>
|
||||
<a name="boost_regex.ref.posix.regexec"></a><h5>
|
||||
<a name="id632046"></a>
|
||||
<a href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
regexec finds the first occurrence of expression e within string buf. If
|
||||
len is non-zero then <span class="emphasis"><em>*m</em></span> is filled in with what matched
|
||||
@ -539,21 +536,22 @@
|
||||
</table></div>
|
||||
<a name="regfree"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.ref.posix.regfree"></a><h4>
|
||||
<a name="id589331"></a>
|
||||
<a name="boost_regex.ref.posix.regfree"></a><h5>
|
||||
<a name="id632188"></a>
|
||||
<a href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">regfree</span></tt> frees all the memory
|
||||
<code class="computeroutput"><span class="identifier">regfree</span></code> frees all the memory
|
||||
that was allocated by regcomp.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> regex_iterator</title>
|
||||
<title>regex_iterator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="regex_replace.html" title=" regex_replace">
|
||||
<link rel="next" href="regex_token_iterator.html" title=" regex_token_iterator">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_replace.html" title="regex_replace">
|
||||
<link rel="next" href="regex_token_iterator.html" title="regex_token_iterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,15 +24,15 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_iterator"></a><a href="regex_iterator.html" title=" regex_iterator"> regex_iterator</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.regex_iterator"></a><a href="regex_iterator.html" title="regex_iterator"> regex_iterator</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The iterator type <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> will enumerate all
|
||||
The iterator type <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> will enumerate all
|
||||
of the regular expression matches found in some sequence: dereferencing a
|
||||
<a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>
|
||||
yields a reference to a <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> object.
|
||||
<a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>
|
||||
yields a reference to a <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> object.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">charT</span> <span class="special">=</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">regex_iterator</span>
|
||||
@ -77,39 +77,37 @@
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.regex_iterator.description"></a><h4>
|
||||
<a name="id547078"></a>
|
||||
<a name="boost_regex.ref.regex_iterator.description"></a><h5>
|
||||
<a name="id590309"></a>
|
||||
<a href="regex_iterator.html#boost_regex.ref.regex_iterator.description">Description</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
A <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>
|
||||
A <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>
|
||||
is constructed from a pair of iterators, and enumerates all occurrences of
|
||||
a regular expression within that iterator range.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.construct1"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span><span class="special">();</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">();</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs an end of sequence
|
||||
<a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>.
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs an end of sequence
|
||||
<a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.construct2"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&</span> <span class="identifier">re</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> that will enumerate
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> that will enumerate
|
||||
all occurrences of the expression <span class="emphasis"><em>re</em></span>, within the sequence
|
||||
[a,b), and found using <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a> <span class="emphasis"><em>m</em></span>.
|
||||
The object <span class="emphasis"><em>re</em></span> must exist for the lifetime of the <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>.
|
||||
[a,b), and found using <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a> <span class="emphasis"><em>m</em></span>.
|
||||
The object <span class="emphasis"><em>re</em></span> must exist for the lifetime of the <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -118,51 +116,46 @@
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.construct3"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a copy of <tt class="computeroutput"><span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a copy of <code class="computeroutput"><span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postconditions</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Postconditions</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.assign"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&);</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: sets <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> equal to those in <tt class="computeroutput"><span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: sets <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> equal to those in <code class="computeroutput"><span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postconditions</b></span>: *this == that.
|
||||
<span class="bold"><strong>Postconditions</strong></span>: *this == that.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.op_eq"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns true if *this is equal
|
||||
<span class="bold"><strong>Effects</strong></span>: returns true if *this is equal
|
||||
to that.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.op_ne"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_iterator</span><span class="special">&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.op_deref"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: dereferencing a <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> object it yields
|
||||
a const reference to a <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> object, whose members
|
||||
<span class="bold"><strong>Effects</strong></span>: dereferencing a <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> object it yields
|
||||
a const reference to a <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> object, whose members
|
||||
are set as follows:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -186,31 +179,31 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">re</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">re</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">empty</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">empty</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">false</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">false</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -223,44 +216,44 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The same as the start of the match found: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
The same as the start of the match found: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
True if the prefix did not match an empty string: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></tt>
|
||||
True if the prefix did not match an empty string: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The same as the end of the match found: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
The same as the end of the match found: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -272,20 +265,20 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
True if the suffix did not match an empty string: <tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></tt>
|
||||
True if the suffix did not match an empty string: <code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -298,7 +291,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -310,7 +303,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -323,12 +316,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>,
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
|
||||
the start of the sequence that matched sub-expression <span class="emphasis"><em>n</em></span>.
|
||||
Alternatively, if sub-expression <span class="emphasis"><em>n</em></span> did not participate
|
||||
in the match, then last.
|
||||
@ -338,12 +331,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>,
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
|
||||
the end of the sequence that matched sub-expression <span class="emphasis"><em>n</em></span>.
|
||||
Alternatively, if sub-expression <span class="emphasis"><em>n</em></span> did not participate
|
||||
in the match, then last.
|
||||
@ -353,12 +346,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">)[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>,
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
|
||||
true if sub-expression <span class="emphasis"><em>n</em></span> participated in the
|
||||
match, false otherwise.
|
||||
</p>
|
||||
@ -367,12 +360,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">position</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></tt>
|
||||
<code class="computeroutput"><span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">position</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></tt>,
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="special">(*</span><span class="identifier">it</span><span class="special">).</span><span class="identifier">size</span><span class="special">()</span></code>,
|
||||
then the distance from the start of the underlying sequence to the
|
||||
start of sub-expression match <span class="emphasis"><em>n</em></span>.
|
||||
</p>
|
||||
@ -382,29 +375,27 @@
|
||||
</table></div>
|
||||
<a name="boost_regex.regex_iterator.op_arrow"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">&(*</span><span class="keyword">this</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">&(*</span><span class="keyword">this</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.op_inc"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: moves the iterator to the next
|
||||
<span class="bold"><strong>Effects</strong></span>: moves the iterator to the next
|
||||
match in the underlying sequence, or the end of sequence iterator if none
|
||||
if found. When the last match found matched a zero length string, then the
|
||||
<a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a>
|
||||
<a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a>
|
||||
will find the next match as follows: if there exists a non-zero length match
|
||||
that starts at the same location as the last one, then returns it, otherwise
|
||||
starts looking for the next (possibly zero length) match from one position
|
||||
to the right of the last match.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -412,24 +403,22 @@
|
||||
in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: *this.
|
||||
<span class="bold"><strong>Returns</strong></span>: *this.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.op_inc2"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a copy result of <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt>, then
|
||||
calls <tt class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a copy result of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>, then
|
||||
calls <code class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: result.
|
||||
<span class="bold"><strong>Returns</strong></span>: result.
|
||||
</p>
|
||||
<a name="boost_regex.regex_iterator.make"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="identifier">regex_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="identifier">make_regex_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
@ -441,21 +430,20 @@
|
||||
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns an iterator that enumerates
|
||||
<span class="bold"><strong>Effects</strong></span>: returns an iterator that enumerates
|
||||
all occurences of expression <span class="emphasis"><em>e</em></span> in text <span class="emphasis"><em>p</em></span>
|
||||
using <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>
|
||||
using <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>
|
||||
<span class="emphasis"><em>m</em></span>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_iterator.examples"></a><h4>
|
||||
<a name="id550235"></a>
|
||||
<a name="boost_regex.ref.regex_iterator.examples"></a><h5>
|
||||
<a name="id593442"></a>
|
||||
<a href="regex_iterator.html#boost_regex.ref.regex_iterator.examples">Examples</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following example takes a C++ source file and builds up an index of class
|
||||
names, and the location of that class in the file.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
@ -549,10 +537,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> regex_match</title>
|
||||
<title>regex_match</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="sub_match.html" title=" sub_match">
|
||||
<link rel="next" href="regex_search.html" title=" regex_search">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="sub_match.html" title="sub_match">
|
||||
<link rel="next" href="regex_search.html" title="regex_search">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,13 +24,13 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_match"></a><a href="regex_match.html" title=" regex_match"> regex_match</a></h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<a name="boost_regex.ref.regex_match"></a><a href="regex_match.html" title="regex_match"> regex_match</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The algorithm <a href="regex_match.html" title=" regex_match"><tt class="computeroutput"><span class="identifier">regex_match</span></tt></a>
|
||||
determines whether a given regular expression matches <span class="bold"><b>all</b></span>
|
||||
The algorithm <a href="regex_match.html" title="regex_match"><code class="computeroutput"><span class="identifier">regex_match</span></code></a>
|
||||
determines whether a given regular expression matches <span class="bold"><strong>all</strong></span>
|
||||
of a given character sequence denoted by a pair of bidirectional-iterators,
|
||||
the algorithm is defined as follows, the main use of this function is data
|
||||
input validation.
|
||||
@ -40,15 +40,14 @@
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
|
||||
<th align="left">Important</th>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
Note that the result is true only if the expression matches the <span class="bold"><b>whole</b></span> of the input sequence. If you want to search
|
||||
for an expression somewhere within the sequence then use <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a>. If you want to match
|
||||
a prefix of the character string then use <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> with the flag match_continuous
|
||||
<tr><td align="left" valign="top"><p>
|
||||
Note that the result is true only if the expression matches the <span class="bold"><strong>whole</strong></span> of the input sequence. If you want to search
|
||||
for an expression somewhere within the sequence then use <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a>. If you want to match
|
||||
a prefix of the character string then use <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> with the flag match_continuous
|
||||
set.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
@ -80,31 +79,30 @@
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.regex_match.description"></a><h4>
|
||||
<a name="id530617"></a>
|
||||
<a name="boost_regex.ref.regex_match.description"></a><h5>
|
||||
<a name="id573914"></a>
|
||||
<a href="regex_match.html#boost_regex.ref.regex_match.description">Description</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Requires</b></span>: Type BidirectionalIterator meets
|
||||
<span class="bold"><strong>Requires</strong></span>: Type BidirectionalIterator meets
|
||||
the requirements of a Bidirectional Iterator (24.1.4).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Determines whether there is an
|
||||
<span class="bold"><strong>Effects</strong></span>: Determines whether there is an
|
||||
exact match between the regular expression <span class="emphasis"><em>e</em></span>, and all
|
||||
of the character sequence [first, last), parameter <span class="emphasis"><em>flags</em></span>
|
||||
(see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>)
|
||||
(see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>)
|
||||
is used to control how the expression is matched against the character sequence.
|
||||
Returns true if such a match exists, false otherwise.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -112,7 +110,7 @@
|
||||
in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postconditions</b></span>: If the function returns
|
||||
<span class="bold"><strong>Postconditions</strong></span>: If the function returns
|
||||
false, then the effect on parameter <span class="emphasis"><em>m</em></span> is undefined,
|
||||
otherwise the effects on parameter <span class="emphasis"><em>m</em></span> are given in the
|
||||
table:
|
||||
@ -138,127 +136,127 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">false</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">false</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">false</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">false</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">false</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">false</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -271,72 +269,69 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the start of the sequence that
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the start of the sequence that
|
||||
matched sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if
|
||||
sub-expression <span class="emphasis"><em>n</em></span> did not participate in the
|
||||
match, then <tt class="computeroutput"><span class="identifier">last</span></tt>.
|
||||
match, then <code class="computeroutput"><span class="identifier">last</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the end of the sequence that matched
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the end of the sequence that matched
|
||||
sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if sub-expression
|
||||
<span class="emphasis"><em>n</em></span> did not participate in the match, then <tt class="computeroutput"><span class="identifier">last</span></tt>.
|
||||
<span class="emphasis"><em>n</em></span> did not participate in the match, then <code class="computeroutput"><span class="identifier">last</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, true if sub-expression <span class="emphasis"><em>n</em></span>
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, true if sub-expression <span class="emphasis"><em>n</em></span>
|
||||
participated in the match, false otherwise.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Behaves "as if" by constructing
|
||||
an instance of <tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="identifier">what</span></tt>,
|
||||
and then returning the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Behaves "as if" by constructing
|
||||
an instance of <code class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="identifier">what</span></code>,
|
||||
and then returning the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
|
||||
<span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>::</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
@ -344,37 +339,34 @@
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
|
||||
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_match</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span> <span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_match</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_match.examples"></a><h4>
|
||||
<a name="id533809"></a>
|
||||
<a name="boost_regex.ref.regex_match.examples"></a><h5>
|
||||
<a name="id577093"></a>
|
||||
<a href="regex_match.html#boost_regex.ref.regex_match.examples">Examples</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following example processes an ftp response:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">stdlib</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">stdlib</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
@ -408,10 +400,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> regex_replace</title>
|
||||
<title>regex_replace</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="regex_search.html" title=" regex_search">
|
||||
<link rel="next" href="regex_iterator.html" title=" regex_iterator">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_search.html" title="regex_search">
|
||||
<link rel="next" href="regex_iterator.html" title="regex_iterator">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,22 +24,21 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_replace"></a><a href="regex_replace.html" title=" regex_replace"> regex_replace</a></h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<a name="boost_regex.ref.regex_replace"></a><a href="regex_replace.html" title="regex_replace"> regex_replace</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The algorithm <a href="regex_replace.html" title=" regex_replace"><tt class="computeroutput"><span class="identifier">regex_replace</span></tt></a> searches through a
|
||||
The algorithm <a href="regex_replace.html" title="regex_replace"><code class="computeroutput"><span class="identifier">regex_replace</span></code></a> searches through a
|
||||
string finding all the matches to the regular expression: for each match
|
||||
it then calls <a href="match_results.html#boost_regex.match_results_format"><tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></tt></a> to format the string and
|
||||
it then calls <a href="match_results.html#boost_regex.match_results_format"><code class="computeroutput"><span class="identifier">match_results</span><span class="special"><>::</span><span class="identifier">format</span></code></a> 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 <span class="emphasis"><em>flags</em></span>
|
||||
parameter does not have the flag <tt class="computeroutput"><span class="identifier">format_no_copy</span></tt>
|
||||
set. If the flag <tt class="computeroutput"><span class="identifier">format_first_only</span></tt>
|
||||
parameter does not have the flag <code class="computeroutput"><span class="identifier">format_no_copy</span></code>
|
||||
set. If the flag <code class="computeroutput"><span class="identifier">format_first_only</span></code>
|
||||
is set then only the first occurrence is replaced rather than all occurrences.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
@ -53,12 +52,11 @@
|
||||
<span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.regex_replace.description"></a><h4>
|
||||
<a name="id541136"></a>
|
||||
<a name="boost_regex.ref.regex_replace.description"></a><h5>
|
||||
<a name="id584393"></a>
|
||||
<a href="regex_replace.html#boost_regex.ref.regex_replace.description">Description</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">OutputIterator</span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
@ -73,84 +71,76 @@
|
||||
and copies the resulting string to <span class="emphasis"><em>out</em></span>.
|
||||
</p>
|
||||
<p>
|
||||
If the flag <tt class="computeroutput"><span class="identifier">format_no_copy</span></tt>
|
||||
If the flag <code class="computeroutput"><span class="identifier">format_no_copy</span></code>
|
||||
is set in <span class="emphasis"><em>flags</em></span> then unmatched sections of text are
|
||||
not copied to output.
|
||||
</p>
|
||||
<p>
|
||||
If the flag <tt class="computeroutput"><span class="identifier">format_first_only</span></tt>
|
||||
If the flag <code class="computeroutput"><span class="identifier">format_first_only</span></code>
|
||||
is set in flags then only the first occurence of <span class="emphasis"><em>e</em></span> is
|
||||
replaced.
|
||||
</p>
|
||||
<p>
|
||||
The manner in which the format string <span class="emphasis"><em>fmt</em></span> is interpretted,
|
||||
along with the rules used for finding matches, are determined by the flags
|
||||
set in <span class="emphasis"><em>flags</em></span>: see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>.
|
||||
set in <span class="emphasis"><em>flags</em></span>: see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Constructs an <a href="regex_iterator.html" title=" regex_iterator"><tt class="computeroutput"><span class="identifier">regex_iterator</span></tt></a> object:
|
||||
<span class="bold"><strong>Effects</strong></span>: Constructs an <a href="regex_iterator.html" title="regex_iterator"><code class="computeroutput"><span class="identifier">regex_iterator</span></code></a> object:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_iterator</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="identifier">regex_iterator</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span>
|
||||
<span class="identifier">i</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">),</span>
|
||||
</pre>
|
||||
<p>
|
||||
and uses <span class="emphasis"><em>i</em></span> to enumerate through all of the matches
|
||||
<span class="emphasis"><em>m</em></span> of type <a href="match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> <tt class="computeroutput"><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span></tt>
|
||||
<span class="emphasis"><em>m</em></span> of type <a href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> <code class="computeroutput"><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span></code>
|
||||
that occur within the sequence [first, last).
|
||||
</p>
|
||||
<p>
|
||||
If no such matches are found and
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="special">!(</span><span class="identifier">flags</span> <span class="special">&</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="special">!(</span><span class="identifier">flags</span> <span class="special">&</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
then calls
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">).</span>
|
||||
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">).</span>
|
||||
</pre>
|
||||
<p>
|
||||
Otherwise, for each match found, if
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="special">!(</span><span class="identifier">flags</span> <span class="special">&</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="special">!(</span><span class="identifier">flags</span> <span class="special">&</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
calls
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">),</span>
|
||||
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">),</span>
|
||||
</pre>
|
||||
<p>
|
||||
and then calls
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">m</span><span class="special">.</span><span class="identifier">format</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">).</span>
|
||||
<pre class="programlisting"><span class="identifier">m</span><span class="special">.</span><span class="identifier">format</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">fmt</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">).</span>
|
||||
</pre>
|
||||
<p>
|
||||
Finally if
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="special">!(</span><span class="identifier">flags</span> <span class="special">&</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="special">!(</span><span class="identifier">flags</span> <span class="special">&</span> <span class="identifier">format_no_copy</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
calls
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last_m</span><span class="special">,</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span>
|
||||
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">last_m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last_m</span><span class="special">,</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span><span class="special">,</span> <span class="identifier">out</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
where <span class="emphasis"><em>last_m</em></span> is a copy of the last match found.
|
||||
</p>
|
||||
<p>
|
||||
If <tt class="computeroutput"><span class="identifier">flags</span> <span class="special">&</span>
|
||||
<span class="identifier">format_first_only</span></tt> is non-zero then
|
||||
If <code class="computeroutput"><span class="identifier">flags</span> <span class="special">&</span>
|
||||
<span class="identifier">format_first_only</span></code> is non-zero then
|
||||
only the first match found is replaced.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -158,31 +148,29 @@
|
||||
in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: out.
|
||||
<span class="bold"><strong>Returns</strong></span>: out.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="identifier">regex_replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>&</span> <span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Constructs an object <tt class="computeroutput"><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="identifier">result</span></tt>, calls <tt class="computeroutput"><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: Constructs an object <code class="computeroutput"><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="identifier">result</span></code>, calls <code class="computeroutput"><span class="identifier">regex_replace</span><span class="special">(</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">fmt</span><span class="special">,</span>
|
||||
<span class="identifier">flags</span><span class="special">)</span></tt>,
|
||||
and then returns <tt class="computeroutput"><span class="identifier">result</span></tt>.
|
||||
<span class="identifier">flags</span><span class="special">)</span></code>,
|
||||
and then returns <code class="computeroutput"><span class="identifier">result</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_replace.examples"></a><h4>
|
||||
<a name="id542698"></a>
|
||||
<a name="boost_regex.ref.regex_replace.examples"></a><h5>
|
||||
<a name="id585942"></a>
|
||||
<a href="regex_replace.html#boost_regex.ref.regex_replace.examples">Examples</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following example takes C/C++ source code as input, and outputs syntax
|
||||
highlighted HTML code.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">sstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iterator</span><span class="special">></span>
|
||||
@ -294,10 +282,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> regex_search</title>
|
||||
<title>regex_search</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="regex_match.html" title=" regex_match">
|
||||
<link rel="next" href="regex_replace.html" title=" regex_replace">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_match.html" title="regex_match">
|
||||
<link rel="next" href="regex_replace.html" title="regex_replace">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,19 +24,18 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_search"></a><a href="regex_search.html" title=" regex_search"> regex_search</a></h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<a name="boost_regex.ref.regex_search"></a><a href="regex_search.html" title="regex_search"> regex_search</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<p>
|
||||
The algorithm <a href="regex_search.html" title=" regex_search"><tt class="computeroutput"><span class="identifier">regex_search</span></tt></a> will search a range
|
||||
The algorithm <a href="regex_search.html" title="regex_search"><code class="computeroutput"><span class="identifier">regex_search</span></code></a> will search a range
|
||||
denoted by a pair of bidirectional-iterators for a given regular expression.
|
||||
The algorithm uses various heuristics to reduce the search time by only checking
|
||||
for a match if a match could conceivably start at that position. The algorithm
|
||||
is defined as follows:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
@ -73,30 +72,29 @@
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.regex_search.description"></a><h4>
|
||||
<a name="id536028"></a>
|
||||
<a name="boost_regex.ref.regex_search.description"></a><h5>
|
||||
<a name="id579303"></a>
|
||||
<a href="regex_search.html#boost_regex.ref.regex_search.description">Description</a>
|
||||
</h4>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">BidirectionalIterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Requires</b></span>: Type BidirectionalIterator meets
|
||||
<span class="bold"><strong>Requires</strong></span>: Type BidirectionalIterator meets
|
||||
the requirements of a Bidirectional Iterator (24.1.4).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Determines whether there is some
|
||||
<span class="bold"><strong>Effects</strong></span>: Determines whether there is some
|
||||
sub-sequence within [first,last) that matches the regular expression <span class="emphasis"><em>e</em></span>,
|
||||
parameter <span class="emphasis"><em>flags</em></span> is used to control how the expression
|
||||
is matched against the character sequence. Returns true if such a sequence
|
||||
exists, false otherwise.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -104,7 +102,7 @@
|
||||
in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postconditions</b></span>: If the function returns
|
||||
<span class="bold"><strong>Postconditions</strong></span>: If the function returns
|
||||
false, then the effect on parameter <span class="emphasis"><em>m</em></span> is undefined,
|
||||
otherwise the effects on parameter <span class="emphasis"><em>m</em></span> are given in the
|
||||
table:
|
||||
@ -130,105 +128,105 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">e</span><span class="special">.</span><span class="identifier">mark_count</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="keyword">false</span></tt>
|
||||
<code class="computeroutput"><span class="keyword">false</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="identifier">m</span><span class="special">.</span><span class="identifier">prefix</span><span class="special">().</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">last</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">last</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">first</span> <span class="special">!=</span>
|
||||
<span class="identifier">m</span><span class="special">.</span><span class="identifier">suffix</span><span class="special">().</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -241,7 +239,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -253,7 +251,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -266,12 +264,12 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">first</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the start of the sequence that
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the start of the sequence that
|
||||
matched sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if
|
||||
sub-expression <span class="emphasis"><em>n</em></span> did not participate in the
|
||||
match, then last.
|
||||
@ -281,45 +279,43 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, the end of the sequence that matched
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, the end of the sequence that matched
|
||||
sub-expression <span class="emphasis"><em>n</em></span>. Alternatively, if sub-expression
|
||||
<span class="emphasis"><em>n</em></span> did not participate in the match, then <tt class="computeroutput"><span class="identifier">last</span></tt>.
|
||||
<span class="emphasis"><em>n</em></span> did not participate in the match, then <code class="computeroutput"><span class="identifier">last</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></tt>
|
||||
<code class="computeroutput"><span class="identifier">m</span><span class="special">[</span><span class="identifier">n</span><span class="special">].</span><span class="identifier">matched</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
For all integers <tt class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>, true if sub-expression <span class="emphasis"><em>n</em></span>
|
||||
For all integers <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>, true if sub-expression <span class="emphasis"><em>n</em></span>
|
||||
participated in the match, false otherwise.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">match_results</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
|
||||
<span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="identifier">match_results</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>::</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">>&</span> <span class="identifier">m</span><span class="special">,</span>
|
||||
@ -327,53 +323,49 @@
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">iterator</span> <span class="identifier">last</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Behaves "as if" by constructing
|
||||
an instance of <tt class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="identifier">what</span></tt>,
|
||||
and then returning the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Behaves "as if" by constructing
|
||||
an instance of <code class="computeroutput"><span class="identifier">match_results</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">></span> <span class="identifier">what</span></code>,
|
||||
and then returning the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">what</span><span class="special">,</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">str</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">str</span><span class="special">,</span> <span class="identifier">str</span>
|
||||
<span class="special">+</span> <span class="identifier">char_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">>::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span>
|
||||
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">ST</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SA</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="keyword">bool</span> <span class="identifier">regex_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">ST</span><span class="special">,</span> <span class="identifier">SA</span><span class="special">>&</span> <span class="identifier">s</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">basic_regex</span><span class="special"><</span><span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">>&</span> <span class="identifier">e</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">flags</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Returns the result of <tt class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: Returns the result of <code class="computeroutput"><span class="identifier">regex_search</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">e</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_search.examples"></a><h4>
|
||||
<a name="id539302"></a>
|
||||
<a name="boost_regex.ref.regex_search.examples"></a><h5>
|
||||
<a name="id582569"></a>
|
||||
<a href="regex_search.html#boost_regex.ref.regex_search.examples">Examples</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following example, takes the contents of a file in the form of a string,
|
||||
and searches for all the C++ class declarations in the file. The code will
|
||||
work regardless of the way that <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt>
|
||||
work regardless of the way that <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
|
||||
is implemented, for example it could easily be modified to work with the
|
||||
SGI rope class, which uses a non-contiguous storage strategy.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
|
||||
@ -417,10 +409,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> regex_token_iterator</title>
|
||||
<title>regex_token_iterator</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="regex_iterator.html" title=" regex_iterator">
|
||||
<link rel="next" href="bad_expression.html" title=" bad_expression">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="regex_iterator.html" title="regex_iterator">
|
||||
<link rel="next" href="bad_expression.html" title="bad_expression">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,22 +24,22 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_token_iterator"></a><a href="regex_token_iterator.html" title=" regex_token_iterator"> regex_token_iterator</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.regex_token_iterator"></a><a href="regex_token_iterator.html" title="regex_token_iterator"> regex_token_iterator</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The template class <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> is an iterator
|
||||
The template class <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> is an iterator
|
||||
adapter; that is to say it represents a new view of an existing iterator
|
||||
sequence, by enumerating all the occurrences of a regular expression within
|
||||
that sequence, and presenting one or more character sequence for each match
|
||||
found. Each position enumerated by the iterator is a <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a> object that represents
|
||||
found. Each position enumerated by the iterator is a <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a> object that represents
|
||||
what matched a particular sub-expression within the regular expression. When
|
||||
class <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> is used to
|
||||
class <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> is used to
|
||||
enumerate a single sub-expression with index -1, then the iterator performs
|
||||
field splitting: that is to say it enumerates one character sequence for
|
||||
each section of the character container sequence that does not match the
|
||||
regular expression specified.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">BidirectionalIterator</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">charT</span> <span class="special">=</span> <span class="identifier">iterator_traits</span><span class="special"><</span><span class="identifier">BidirectionalIterator</span><span class="special">>::</span><span class="identifier">value_type</span><span class="special">,</span>
|
||||
<span class="keyword">class</span> <span class="identifier">traits</span> <span class="special">=</span> <span class="identifier">regex_traits</span><span class="special"><</span><span class="identifier">charT</span><span class="special">></span> <span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">regex_token_iterator</span>
|
||||
@ -135,43 +135,41 @@
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">>&</span> <span class="identifier">submatch</span><span class="special">,</span>
|
||||
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.ref.regex_token_iterator.description"></a><h4>
|
||||
<a name="id556067"></a>
|
||||
<a name="boost_regex.ref.regex_token_iterator.description"></a><h5>
|
||||
<a name="id599254"></a>
|
||||
<a href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.description">Description</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<a name="boost_regex.regex_token_iterator.construct1"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">();</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">();</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs an end of sequence iterator.
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs an end of sequence iterator.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.construct2"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&</span> <span class="identifier">re</span><span class="special">,</span>
|
||||
<span class="keyword">int</span> <span class="identifier">submatch</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Preconditions</b></span>: <tt class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>. Object <span class="emphasis"><em>re</em></span> shall exist
|
||||
<span class="bold"><strong>Preconditions</strong></span>: <code class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>. Object <span class="emphasis"><em>re</em></span> shall exist
|
||||
for the lifetime of the iterator constructed from it.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that will enumerate
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that will enumerate
|
||||
one string for each regular expression match of the expression <span class="emphasis"><em>re</em></span>
|
||||
found within the sequence [a,b), using match flags <span class="emphasis"><em>m</em></span>
|
||||
(see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>).
|
||||
(see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>).
|
||||
The string enumerated is the sub-expression <span class="emphasis"><em>submatch</em></span>
|
||||
for each match found; if <span class="emphasis"><em>submatch</em></span> is -1, then enumerates
|
||||
all the text sequences that did not match the expression <span class="emphasis"><em>re</em></span>
|
||||
(that is to performs field splitting).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -180,33 +178,32 @@
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.construct3"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&</span> <span class="identifier">re</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">>&</span> <span class="identifier">submatches</span><span class="special">,</span>
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Preconditions</b></span>: <tt class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span>
|
||||
<span class="special">&&</span> <span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>. Object <span class="emphasis"><em>re</em></span> shall exist
|
||||
<span class="bold"><strong>Preconditions</strong></span>: <code class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span>
|
||||
<span class="special">&&</span> <span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>. Object <span class="emphasis"><em>re</em></span> shall exist
|
||||
for the lifetime of the iterator constructed from it.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that will enumerate
|
||||
<tt class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that will enumerate
|
||||
<code class="computeroutput"><span class="identifier">submatches</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
|
||||
strings for each regular expression match of the expression <span class="emphasis"><em>re</em></span>
|
||||
found within the sequence [a,b), using match flags <span class="emphasis"><em>m</em></span>
|
||||
(see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>).
|
||||
(see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>).
|
||||
For each match found one string will be enumerated for each sub-expression
|
||||
index contained within submatches vector; if <tt class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></tt>
|
||||
index contained within submatches vector; if <code class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
|
||||
is -1, then the first string enumerated for each match will be all of the
|
||||
text from end of the last match to the start of the current match, in addition
|
||||
there will be one extra string enumerated when no more matches can be found:
|
||||
from the end of the last match found, to the end of the underlying sequence.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -215,8 +212,7 @@
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.construct4"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">></span>
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="identifier">BidirectionalIterator</span> <span class="identifier">a</span><span class="special">,</span>
|
||||
<span class="identifier">BidirectionalIterator</span> <span class="identifier">b</span><span class="special">,</span>
|
||||
<span class="keyword">const</span> <span class="identifier">regex_type</span><span class="special">&</span> <span class="identifier">re</span><span class="special">,</span>
|
||||
@ -224,23 +220,23 @@
|
||||
<span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Preconditions</b></span>: <tt class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>. Object <span class="emphasis"><em>re</em></span> shall exist
|
||||
<span class="bold"><strong>Preconditions</strong></span>: <code class="computeroutput"><span class="special">!</span><span class="identifier">re</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>. Object <span class="emphasis"><em>re</em></span> shall exist
|
||||
for the lifetime of the iterator constructed from it.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that will enumerate
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that will enumerate
|
||||
<span class="emphasis"><em>R</em></span> strings for each regular expression match of the expression
|
||||
<span class="emphasis"><em>re</em></span> found within the sequence [a,b), using match flags
|
||||
<span class="emphasis"><em>m</em></span> (see <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>). For each match
|
||||
<span class="emphasis"><em>m</em></span> (see <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>). For each match
|
||||
found one string will be enumerated for each sub-expression index contained
|
||||
within the <span class="emphasis"><em>submatches</em></span> array; if <tt class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></tt>
|
||||
within the <span class="emphasis"><em>submatches</em></span> array; if <code class="computeroutput"><span class="identifier">submatches</span><span class="special">[</span><span class="number">0</span><span class="special">]</span></code>
|
||||
is -1, then the first string enumerated for each match will be all of the
|
||||
text from end of the last match to the start of the current match, in addition
|
||||
there will be one extra string enumerated when no more matches can be found:
|
||||
from the end of the last match found, to the end of the underlying sequence.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -249,70 +245,63 @@
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.construct5"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a copy of <tt class="computeroutput"><span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a copy of <code class="computeroutput"><span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postconditions</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Postconditions</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.assign"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="identifier">that</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: sets <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> to be equal to <tt class="computeroutput"><span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: sets <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> to be equal to <code class="computeroutput"><span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Postconditions</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Postconditions</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.op_eq"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns true if <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt> is the same position as <tt class="computeroutput"><span class="identifier">that</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: returns true if <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> is the same position as <code class="computeroutput"><span class="identifier">that</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.op_ne"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">regex_token_iterator</span><span class="special">&)</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">!(*</span><span class="keyword">this</span> <span class="special">==</span> <span class="identifier">that</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.op_deref"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns the current character sequence
|
||||
<span class="bold"><strong>Effects</strong></span>: returns the current character sequence
|
||||
being enumerated.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.op_arrow"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span><span class="keyword">const</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns <tt class="computeroutput"><span class="special">&(*</span><span class="keyword">this</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: returns <code class="computeroutput"><span class="special">&(*</span><span class="keyword">this</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.op_inc1"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: Moves on to the next character
|
||||
<span class="bold"><strong>Effects</strong></span>: Moves on to the next character
|
||||
sequence to be enumerated.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Throws</b></span>: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></tt>
|
||||
<span class="bold"><strong>Throws</strong></span>: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
|
||||
if the complexity of matching the expression against an N character string
|
||||
begins to exceed O(N<sup>2</sup>), or if the program runs out of stack space while matching
|
||||
the expression (if Boost.Regex is configured in recursive mode), or if the
|
||||
@ -320,24 +309,22 @@
|
||||
in non-recursive mode).
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt>.
|
||||
<span class="bold"><strong>Returns</strong></span>: <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.op_inc2"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">regex_token_iterator</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: constructs a copy result of <tt class="computeroutput"><span class="special">*</span><span class="keyword">this</span></tt>, then
|
||||
calls <tt class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></tt>.
|
||||
<span class="bold"><strong>Effects</strong></span>: constructs a copy result of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>, then
|
||||
calls <code class="computeroutput"><span class="special">++(*</span><span class="keyword">this</span><span class="special">)</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><b>Returns</b></span>: result.
|
||||
<span class="bold"><strong>Returns</strong></span>: result.
|
||||
</p>
|
||||
<a name="boost_regex.regex_token_iterator.make"></a><p>
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="identifier">regex_token_iterator</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*,</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span><span class="special">></span>
|
||||
<span class="identifier">make_regex_token_iterator</span><span class="special">(</span>
|
||||
<span class="keyword">const</span> <span class="identifier">charT</span><span class="special">*</span> <span class="identifier">p</span><span class="special">,</span>
|
||||
@ -388,22 +375,21 @@
|
||||
<span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><b>Effects</b></span>: returns a <a href="regex_token_iterator.html" title=" regex_token_iterator"><tt class="computeroutput"><span class="identifier">regex_token_iterator</span></tt></a> that enumerates
|
||||
one <a href="sub_match.html" title=" sub_match"><tt class="computeroutput"><span class="identifier">sub_match</span></tt></a>
|
||||
<span class="bold"><strong>Effects</strong></span>: returns a <a href="regex_token_iterator.html" title="regex_token_iterator"><code class="computeroutput"><span class="identifier">regex_token_iterator</span></code></a> that enumerates
|
||||
one <a href="sub_match.html" title="sub_match"><code class="computeroutput"><span class="identifier">sub_match</span></code></a>
|
||||
for each value in <span class="emphasis"><em>submatch</em></span> for each occurrence of regular
|
||||
expression <span class="emphasis"><em>e</em></span> in string <span class="emphasis"><em>p</em></span>, matched
|
||||
using <a href="match_flag_type.html" title=" match_flag_type"><tt class="computeroutput"><span class="identifier">match_flag_type</span></tt></a>
|
||||
using <a href="match_flag_type.html" title="match_flag_type"><code class="computeroutput"><span class="identifier">match_flag_type</span></code></a>
|
||||
<span class="emphasis"><em>m</em></span>.
|
||||
</p>
|
||||
<a name="boost_regex.ref.regex_token_iterator.examples"></a><h4>
|
||||
<a name="id560313"></a>
|
||||
<a name="boost_regex.ref.regex_token_iterator.examples"></a><h5>
|
||||
<a name="id603471"></a>
|
||||
<a href="regex_token_iterator.html#boost_regex.ref.regex_token_iterator.examples">Examples</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The following example takes a string and splits it into a series of tokens:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
|
||||
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">;</span>
|
||||
@ -441,8 +427,7 @@
|
||||
The following example takes a html file and outputs a list of all the linked
|
||||
files:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">fstream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iterator</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -511,10 +496,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> regex_traits</title>
|
||||
<title>regex_traits</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="error_type.html" title=" error_type">
|
||||
<link rel="next" href="non_std_strings.html" title=" Interfacing With Non-Standard
|
||||
String Types">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="error_type.html" title="error_type">
|
||||
<link rel="next" href="non_std_strings.html" title="Interfacing With Non-Standard String Types">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.regex_traits"></a><a href="regex_traits.html" title=" regex_traits"> regex_traits</a></h3></div></div></div>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
<a name="boost_regex.ref.regex_traits"></a><a href="regex_traits.html" title="regex_traits"> regex_traits</a>
|
||||
</h3></div></div></div>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">implementationT</span> <span class="special">=</span> <span class="identifier">sensible_default_choice</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">regex_traits</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">implementationT</span>
|
||||
@ -39,35 +38,35 @@
|
||||
<span class="keyword">struct</span> <span class="identifier">c_regex_traits</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">cpp_regex_traits</span><span class="special">;</span>
|
||||
<span class="keyword">class</span> <span class="identifier">cpp_regex_traits</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">charT</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">w32_regex_traits</span><span class="special">;</span>
|
||||
<span class="keyword">class</span> <span class="identifier">w32_regex_traits</span><span class="special">;</span>
|
||||
|
||||
<span class="special">}</span> <span class="comment">// namespace boost
|
||||
</span></pre>
|
||||
<a name="boost_regex.ref.regex_traits.description"></a><h4>
|
||||
<a name="id570424"></a>
|
||||
<a name="boost_regex.ref.regex_traits.description"></a><h5>
|
||||
<a name="id613383"></a>
|
||||
<a href="regex_traits.html#boost_regex.ref.regex_traits.description">Description</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The class <tt class="computeroutput"><span class="identifier">regex_traits</span></tt> is
|
||||
The class <code class="computeroutput"><span class="identifier">regex_traits</span></code> is
|
||||
just a thin wrapper around an actual implemention class, which may be one
|
||||
of:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<tt class="computeroutput"><span class="identifier">c_regex_traits</span></tt>: this class
|
||||
<code class="computeroutput"><span class="identifier">c_regex_traits</span></code>: this class
|
||||
is deprecated, it wraps the C locale, and is used as the default implementation
|
||||
when the platform is not Win32, and the C++ locale is not available.
|
||||
</li>
|
||||
<li>
|
||||
<tt class="computeroutput"><span class="identifier">cpp_regex_traits</span></tt>: the default
|
||||
<code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>: the default
|
||||
traits class for non-Win32 platforms, allows the regex class to be imbued
|
||||
with a std::locale instance.
|
||||
</li>
|
||||
<li>
|
||||
<tt class="computeroutput"><span class="identifier">w32_regex_traits</span></tt>: the default
|
||||
<code class="computeroutput"><span class="identifier">w32_regex_traits</span></code>: the default
|
||||
traits class implementation on Win32 platforms, allows the regex class
|
||||
to be imbued with an LCID.
|
||||
</li>
|
||||
@ -78,26 +77,26 @@
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
BOOST_REGEX_USE_C_LOCALE: makes <tt class="computeroutput"><span class="identifier">c_regex_traits</span></tt>
|
||||
BOOST_REGEX_USE_C_LOCALE: makes <code class="computeroutput"><span class="identifier">c_regex_traits</span></code>
|
||||
the default.
|
||||
</li>
|
||||
<li>
|
||||
BOOST_REGEX_USE_CPP_LOCALE: makes <tt class="computeroutput"><span class="identifier">cpp_regex_traits</span></tt>
|
||||
BOOST_REGEX_USE_CPP_LOCALE: makes <code class="computeroutput"><span class="identifier">cpp_regex_traits</span></code>
|
||||
the default.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
All these traits classes fulfil the <a href="concepts/traits_concept.html" title=" Traits Class
|
||||
Requirements">traits
|
||||
All these traits classes fulfil the <a href="concepts/traits_concept.html" title="Traits Class Requirements">traits
|
||||
class requirements</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> syntax_option_type</title>
|
||||
<title>syntax_option_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../ref.html" title=" Reference">
|
||||
<link rel="prev" href="bad_expression.html" title=" bad_expression">
|
||||
<link rel="next" href="syntax_option_type/syntax_option_type_synopsis.html" title="
|
||||
syntax_option_type Synopsis">
|
||||
<link rel="up" href="../ref.html" title="Reference">
|
||||
<link rel="prev" href="bad_expression.html" title="bad_expression">
|
||||
<link rel="next" href="syntax_option_type/syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type"></a><a href="syntax_option_type.html" title=" syntax_option_type"> syntax_option_type</a></h3></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type"></a><a href="syntax_option_type.html" title="syntax_option_type"> syntax_option_type</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="syntax_option_type/syntax_option_type_synopsis.html">
|
||||
syntax_option_type Synopsis</a></span></dt>
|
||||
@ -43,10 +43,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Options for POSIX Basic Regular Expressions</title>
|
||||
<title>Options for POSIX Basic Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_extended.html" title="
|
||||
Options for POSIX Extended Regular Expressions">
|
||||
<link rel="next" href="syntax_option_type_literal.html" title="
|
||||
Options for Literal Strings">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
|
||||
<link rel="next" href="syntax_option_type_literal.html" title="Options for Literal Strings">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_basic"></a><a href="syntax_option_type_basic.html" title="
|
||||
Options for POSIX Basic Regular Expressions">
|
||||
Options for POSIX Basic Regular Expressions</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_basic"></a><a href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
|
||||
Options for POSIX Basic Regular Expressions</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
Exactly one of the following must always be set for POSIX basic regular
|
||||
expressions:
|
||||
@ -72,8 +69,7 @@
|
||||
<td>
|
||||
<p>
|
||||
Specifies that the grammar recognized by the regular expression
|
||||
engine is the same as that used by <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">POSIX
|
||||
engine is the same as that used by <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX
|
||||
basic regular expressions</a> in IEEE Std 1003.1-2001, Portable
|
||||
Operating System Interface (POSIX ), Base Definitions and Headers,
|
||||
Section 9, Regular Expressions (FWD.1).
|
||||
@ -111,13 +107,12 @@
|
||||
<td>
|
||||
<p>
|
||||
Specifies that the grammar recognized by the regular expression
|
||||
engine is the same as that used by POSIX utility <tt class="computeroutput"><span class="identifier">grep</span></tt> in IEEE Std 1003.1-2001,
|
||||
engine is the same as that used by POSIX utility <code class="computeroutput"><span class="identifier">grep</span></code> in IEEE Std 1003.1-2001,
|
||||
Portable Operating System Interface (POSIX ), Shells and Utilities,
|
||||
Section 4, Utilit\ies, grep (FWD.1).
|
||||
</p>
|
||||
<p>
|
||||
That is to say, the same as <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">POSIX
|
||||
That is to say, the same as <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX
|
||||
basic syntax</a>, but with the newline character acting as an
|
||||
alternation character; the expression is treated as a newline separated
|
||||
list of alternatives.
|
||||
@ -137,8 +132,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Specifies that the grammar recognised is the superset of the <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">POSIX-Basic syntax</a>
|
||||
Specifies that the grammar recognised is the superset of the <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-Basic syntax</a>
|
||||
used by the emacs program.
|
||||
</p>
|
||||
</td>
|
||||
@ -205,7 +199,7 @@
|
||||
<p>
|
||||
Specifies that when a regular expression is matched against a character
|
||||
container sequence, then no sub-expression matches are to be stored
|
||||
in the supplied <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> structure.
|
||||
in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -243,9 +237,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Specifies that character ranges of the form <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></tt>
|
||||
should be locale sensitive. This bit is on by default for <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">POSIX-Basic regular expressions</a>,
|
||||
Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
|
||||
should be locale sensitive. This bit is on by default for <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-Basic regular expressions</a>,
|
||||
but can be unset to force ranges to be compared by code point only.
|
||||
</p>
|
||||
</td>
|
||||
@ -265,7 +258,7 @@
|
||||
<p>
|
||||
Specifies that the \n character has the same effect as the alternation
|
||||
operator |. Allows newline separated lists to be used as a list
|
||||
of alternatives. This bit is already set, if you use the <tt class="computeroutput"><span class="identifier">grep</span></tt> option.
|
||||
of alternatives. This bit is already set, if you use the <code class="computeroutput"><span class="identifier">grep</span></code> option.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -282,7 +275,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
When set then character classes such as <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">alnum</span><span class="special">:]]</span></tt>
|
||||
When set then character classes such as <code class="computeroutput"><span class="special">[[:</span><span class="identifier">alnum</span><span class="special">:]]</span></code>
|
||||
are not allowed.
|
||||
</p>
|
||||
</td>
|
||||
@ -301,9 +294,8 @@
|
||||
<td>
|
||||
<p>
|
||||
When set this makes the escape character ordinary inside lists,
|
||||
so that <tt class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></tt> would match either '\' or 'b'.
|
||||
This bit is on by default for <a href="../../syntax/basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">POSIX-basic
|
||||
so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'.
|
||||
This bit is on by default for <a href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-basic
|
||||
regular expressions</a>, but can be unset to force escapes to
|
||||
be recognised inside lists.
|
||||
</p>
|
||||
@ -339,8 +331,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
When set then <tt class="computeroutput"><span class="special">\?</span></tt> acts
|
||||
as a zero-or-one repeat operator, and <tt class="computeroutput"><span class="special">\+</span></tt>
|
||||
When set then <code class="computeroutput"><span class="special">\?</span></code> acts
|
||||
as a zero-or-one repeat operator, and <code class="computeroutput"><span class="special">\+</span></code>
|
||||
acts as a one-or-more repeat operator.
|
||||
</p>
|
||||
</td>
|
||||
@ -358,7 +350,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
When set then <tt class="computeroutput"><span class="special">\|</span></tt> acts
|
||||
When set then <code class="computeroutput"><span class="special">\|</span></code> acts
|
||||
as the alternation operator.
|
||||
</p>
|
||||
</td>
|
||||
@ -376,7 +368,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Prevents <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> from throwing
|
||||
Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
|
||||
an exception when an invalid expression is encountered.
|
||||
</p>
|
||||
</td>
|
||||
@ -386,10 +378,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Options for POSIX Extended Regular Expressions</title>
|
||||
<title>Options for POSIX Extended Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_perl.html" title="
|
||||
Options for Perl Regular Expressions">
|
||||
<link rel="next" href="syntax_option_type_basic.html" title="
|
||||
Options for POSIX Basic Regular Expressions">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
|
||||
<link rel="next" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,12 +24,11 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_extended"></a><a href="syntax_option_type_extended.html" title="
|
||||
Options for POSIX Extended Regular Expressions">
|
||||
Options for POSIX Extended Regular Expressions</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_extended"></a><a href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
|
||||
Options for POSIX Extended Regular Expressions</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
Exactly one of the following must always be set for <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular
|
||||
Expression Syntax">POSIX
|
||||
Exactly one of the following must always be set for <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
|
||||
extended regular expressions</a>:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
@ -79,8 +75,7 @@
|
||||
(FWD.1).
|
||||
</p>
|
||||
<p>
|
||||
Refer to the <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular
|
||||
Expression Syntax">POSIX
|
||||
Refer to the <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
|
||||
extended regular expression guide</a> for more information.
|
||||
</p>
|
||||
<p>
|
||||
@ -111,8 +106,7 @@
|
||||
grep (FWD.1).
|
||||
</p>
|
||||
<p>
|
||||
That is to say, the same as <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular
|
||||
Expression Syntax">POSIX
|
||||
That is to say, the same as <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
|
||||
extended syntax</a>, but with the newline character acting as
|
||||
an alternation character in addition to "|".
|
||||
</p>
|
||||
@ -137,8 +131,7 @@
|
||||
and Utilities, Section 4, awk (FWD.1).
|
||||
</p>
|
||||
<p>
|
||||
That is to say: the same as <a href="../../syntax/basic_extended.html" title=" POSIX Extended Regular
|
||||
Expression Syntax">POSIX
|
||||
That is to say: the same as <a href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX
|
||||
extended syntax</a>, but with escape sequences in character
|
||||
classes permitted.
|
||||
</p>
|
||||
@ -214,7 +207,7 @@
|
||||
<p>
|
||||
Specifies that when a regular expression is matched against a character
|
||||
container sequence, then no sub-expression matches are to be stored
|
||||
in the supplied <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> structure.
|
||||
in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -252,7 +245,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Specifies that character ranges of the form <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></tt>
|
||||
Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
|
||||
should be locale sensitive. This bit is on by default for POSIX-Extended
|
||||
regular expressions, but can be unset to force ranges to be compared
|
||||
by code point only.
|
||||
@ -292,7 +285,7 @@
|
||||
<td>
|
||||
<p>
|
||||
When set this makes the escape character ordinary inside lists,
|
||||
so that <tt class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></tt> would match either '\' or 'b'.
|
||||
so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'.
|
||||
This bit is on by default for POSIX-Extended regular expressions,
|
||||
but can be unset to force escapes to be recognised inside lists.
|
||||
</p>
|
||||
@ -330,7 +323,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Prevents <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> from throwing
|
||||
Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
|
||||
an exception when an invalid expression is encountered.
|
||||
</p>
|
||||
</td>
|
||||
@ -340,10 +333,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Options for Literal Strings</title>
|
||||
<title>Options for Literal Strings</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_basic.html" title="
|
||||
Options for POSIX Basic Regular Expressions">
|
||||
<link rel="next" href="../match_flag_type.html" title=" match_flag_type">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">
|
||||
<link rel="next" href="../match_flag_type.html" title="match_flag_type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_literal"></a><a href="syntax_option_type_literal.html" title="
|
||||
Options for Literal Strings">
|
||||
Options for Literal Strings</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_literal"></a><a href="syntax_option_type_literal.html" title="Options for Literal Strings">
|
||||
Options for Literal Strings</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The following must always be set to interpret the expression as a string
|
||||
literal:
|
||||
@ -145,10 +143,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Overview of syntax_option_type</title>
|
||||
<title>Overview of syntax_option_type</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_synopsis.html" title="
|
||||
syntax_option_type Synopsis">
|
||||
<link rel="next" href="syntax_option_type_perl.html" title="
|
||||
Options for Perl Regular Expressions">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
|
||||
<link rel="next" href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,38 +24,35 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_overview"></a><a href="syntax_option_type_overview.html" title="
|
||||
Overview of syntax_option_type">
|
||||
Overview of syntax_option_type</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_overview"></a><a href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
|
||||
Overview of syntax_option_type</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The type <a href="../syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a> is an implementation
|
||||
The type <a href="../syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a> is an implementation
|
||||
specific bitmask type (see C++ standard 17.3.2.1.2). Setting its elements
|
||||
has the effects listed in the table below, a valid value of type <a href="../syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a>
|
||||
will always have exactly one of the elements <tt class="computeroutput"><span class="identifier">normal</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">basic</span></tt>, <tt class="computeroutput"><span class="identifier">extended</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">awk</span></tt>, <tt class="computeroutput"><span class="identifier">grep</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">egrep</span></tt>, <tt class="computeroutput"><span class="identifier">sed</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">literal</span></tt> or <tt class="computeroutput"><span class="identifier">perl</span></tt> set.
|
||||
has the effects listed in the table below, a valid value of type <a href="../syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>
|
||||
will always have exactly one of the elements <code class="computeroutput"><span class="identifier">normal</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">basic</span></code>, <code class="computeroutput"><span class="identifier">extended</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">awk</span></code>, <code class="computeroutput"><span class="identifier">grep</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">egrep</span></code>, <code class="computeroutput"><span class="identifier">sed</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">literal</span></code> or <code class="computeroutput"><span class="identifier">perl</span></code> set.
|
||||
</p>
|
||||
<p>
|
||||
Note that for convenience all the constants listed here are duplicated
|
||||
within the scope of class template <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>, so you can use any
|
||||
within the scope of class template <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>, so you can use any
|
||||
of:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">constant_name</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">constant_name</span>
|
||||
</pre>
|
||||
<p>
|
||||
or
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">constant_name</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">constant_name</span>
|
||||
</pre>
|
||||
<p>
|
||||
or
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span><span class="special">::</span><span class="identifier">constant_name</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span><span class="special">::</span><span class="identifier">constant_name</span>
|
||||
</pre>
|
||||
<p>
|
||||
in an interchangeable manner.
|
||||
@ -66,10 +60,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Options for Perl Regular Expressions</title>
|
||||
<title>Options for Perl Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_overview.html" title="
|
||||
Overview of syntax_option_type">
|
||||
<link rel="next" href="syntax_option_type_extended.html" title="
|
||||
Options for POSIX Extended Regular Expressions">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
|
||||
<link rel="next" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_perl"></a><a href="syntax_option_type_perl.html" title="
|
||||
Options for Perl Regular Expressions">
|
||||
Options for Perl Regular Expressions</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_perl"></a><a href="syntax_option_type_perl.html" title="Options for Perl Regular Expressions">
|
||||
Options for Perl Regular Expressions</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
One of the following must always be set for perl regular expressions:
|
||||
</p>
|
||||
@ -76,12 +73,11 @@
|
||||
part 10, RegExp (Regular Expression) Objects (FWD.1).
|
||||
</p>
|
||||
<p>
|
||||
This is functionally identical to the <a href="../../syntax/perl_syntax.html" title=" Perl Regular Expression
|
||||
Syntax">Perl
|
||||
This is functionally identical to the <a href="../../syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl
|
||||
regular expression syntax</a>.
|
||||
</p>
|
||||
<p>
|
||||
Boost.Regex also recognizes all of the perl-compatible <tt class="computeroutput"><span class="special">(?...)</span></tt> extensions in this mode.
|
||||
Boost.Regex also recognizes all of the perl-compatible <code class="computeroutput"><span class="special">(?...)</span></code> extensions in this mode.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -215,7 +211,7 @@
|
||||
<p>
|
||||
Specifies that when a regular expression is matched against a character
|
||||
container sequence, then no sub-expression matches are to be stored
|
||||
in the supplied <a href="../match_results.html" title=" match_results"><tt class="computeroutput"><span class="identifier">match_results</span></tt></a> structure.
|
||||
in the supplied <a href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -253,7 +249,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Specifies that character ranges of the form <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></tt>
|
||||
Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code>
|
||||
should be locale sensitive.
|
||||
</p>
|
||||
</td>
|
||||
@ -290,7 +286,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Prevents <a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a> from throwing
|
||||
Prevents <a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing
|
||||
an exception when an invalid expression is encountered.
|
||||
</p>
|
||||
</td>
|
||||
@ -329,9 +325,9 @@
|
||||
<td>
|
||||
<p>
|
||||
Normally whether Boost.Regex will match "." against a
|
||||
newline character is determined by the match flag <tt class="computeroutput"><span class="identifier">match_dot_not_newline</span></tt>. Specifying
|
||||
this flag is equivalent to prefixing the expression with <tt class="computeroutput"><span class="special">(?-</span><span class="identifier">s</span><span class="special">)</span></tt> and therefore causes "."
|
||||
not to match a newline character regardless of whether <tt class="computeroutput"><span class="identifier">match_not_dot_newline</span></tt> is set
|
||||
newline character is determined by the match flag <code class="computeroutput"><span class="identifier">match_dot_not_newline</span></code>. Specifying
|
||||
this flag is equivalent to prefixing the expression with <code class="computeroutput"><span class="special">(?-</span><span class="identifier">s</span><span class="special">)</span></code> and therefore causes "."
|
||||
not to match a newline character regardless of whether <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code> is set
|
||||
in the match flags.
|
||||
</p>
|
||||
</td>
|
||||
@ -350,9 +346,9 @@
|
||||
<td>
|
||||
<p>
|
||||
Normally whether Boost.Regex will match "." against a
|
||||
newline character is determined by the match flag <tt class="computeroutput"><span class="identifier">match_dot_not_newline</span></tt>. Specifying
|
||||
this flag is equivalent to prefixing the expression with <tt class="computeroutput"><span class="special">(?</span><span class="identifier">s</span><span class="special">)</span></tt> and therefore causes "."
|
||||
to match a newline character regardless of whether <tt class="computeroutput"><span class="identifier">match_not_dot_newline</span></tt> is set
|
||||
newline character is determined by the match flag <code class="computeroutput"><span class="identifier">match_dot_not_newline</span></code>. Specifying
|
||||
this flag is equivalent to prefixing the expression with <code class="computeroutput"><span class="special">(?</span><span class="identifier">s</span><span class="special">)</span></code> and therefore causes "."
|
||||
to match a newline character regardless of whether <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code> is set
|
||||
in the match flags.
|
||||
</p>
|
||||
</td>
|
||||
@ -380,10 +376,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
syntax_option_type Synopsis</title>
|
||||
<title>syntax_option_type Synopsis</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="prev" href="../syntax_option_type.html" title=" syntax_option_type">
|
||||
<link rel="next" href="syntax_option_type_overview.html" title="
|
||||
Overview of syntax_option_type">
|
||||
<link rel="up" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="prev" href="../syntax_option_type.html" title="syntax_option_type">
|
||||
<link rel="next" href="syntax_option_type_overview.html" title="Overview of syntax_option_type">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,18 +24,17 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_synopsis"></a><a href="syntax_option_type_synopsis.html" title="
|
||||
syntax_option_type Synopsis">
|
||||
syntax_option_type Synopsis</a></h4></div></div></div>
|
||||
<a name="boost_regex.ref.syntax_option_type.syntax_option_type_synopsis"></a><a href="syntax_option_type_synopsis.html" title="syntax_option_type Synopsis">
|
||||
syntax_option_type Synopsis</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
Type <a href="../syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a>
|
||||
Type <a href="../syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>
|
||||
is an implementation specific bitmask type that controls how a regular
|
||||
expression string is to be interpreted. For convenience note that all the
|
||||
constants listed here, are also duplicated within the scope of class template
|
||||
<a href="../basic_regex.html" title=" basic_regex"><tt class="computeroutput"><span class="identifier">basic_regex</span></tt></a>.
|
||||
<a href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>.
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">implementation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">syntax_option_type</span><span class="special">;</span>
|
||||
|
||||
@ -65,10 +62,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Regular Expression Syntax</title>
|
||||
<title>Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="partial_matches.html" title=" Partial Matches">
|
||||
<link rel="next" href="syntax/perl_syntax.html" title=" Perl Regular Expression
|
||||
Syntax">
|
||||
<link rel="prev" href="partial_matches.html" title="Partial Matches">
|
||||
<link rel="next" href="syntax/perl_syntax.html" title="Perl Regular Expression Syntax">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.syntax"></a><a href="syntax.html" title=" Regular Expression Syntax"> Regular Expression Syntax</a></h2></div></div></div>
|
||||
<a name="boost_regex.syntax"></a><a href="syntax.html" title="Regular Expression Syntax"> Regular Expression Syntax</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="syntax/perl_syntax.html"> Perl Regular Expression
|
||||
Syntax</a></span></dt>
|
||||
@ -63,18 +63,15 @@
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<a href="syntax/perl_syntax.html" title=" Perl Regular Expression
|
||||
Syntax">Perl (this is the default
|
||||
<a href="syntax/perl_syntax.html" title="Perl Regular Expression Syntax">Perl (this is the default
|
||||
behavior)</a>.
|
||||
</li>
|
||||
<li>
|
||||
<a href="syntax/basic_extended.html" title=" POSIX Extended Regular
|
||||
Expression Syntax">POSIX extended (including
|
||||
<a href="syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX extended (including
|
||||
the egrep and awk variations)</a>.
|
||||
</li>
|
||||
<li>
|
||||
<a href="syntax/basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">POSIX Basic (including the
|
||||
<a href="syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX Basic (including the
|
||||
grep and emacs variations)</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
@ -82,25 +79,14 @@
|
||||
You can also construct a regular expression that treats every character as
|
||||
a literal, but that's not really a "syntax"!
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> POSIX Basic Regular
|
||||
Expression Syntax</title>
|
||||
<title>POSIX Basic Regular Expression Syntax</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax">
|
||||
<link rel="prev" href="basic_extended.html" title=" POSIX Extended Regular
|
||||
Expression Syntax">
|
||||
<link rel="next" href="character_classes.html" title=" Character Class
|
||||
Names">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax">
|
||||
<link rel="next" href="character_classes.html" title="Character Class Names">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,59 +24,58 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.basic_syntax"></a><a href="basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax"> POSIX Basic Regular
|
||||
Expression Syntax</a></h3></div></div></div>
|
||||
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h3>
|
||||
<a name="id475172"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax"></a><a href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax"> POSIX Basic Regular
|
||||
Expression Syntax</a>
|
||||
</h3></div></div></div>
|
||||
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
|
||||
<a name="id518880"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
The POSIX-Basic regular expression syntax is used by the Unix utility <tt class="computeroutput"><span class="identifier">sed</span></tt>, and variations are used by <tt class="computeroutput"><span class="identifier">grep</span></tt> and <tt class="computeroutput"><span class="identifier">emacs</span></tt>.
|
||||
The POSIX-Basic regular expression syntax is used by the Unix utility <code class="computeroutput"><span class="identifier">sed</span></code>, and variations are used by <code class="computeroutput"><span class="identifier">grep</span></code> and <code class="computeroutput"><span class="identifier">emacs</span></code>.
|
||||
You can construct POSIX basic regular expressions in Boost.Regex by passing
|
||||
the flag <tt class="computeroutput"><span class="identifier">basic</span></tt> to the regex
|
||||
constructor (see <a href="../ref/syntax_option_type.html" title=" syntax_option_type"><tt class="computeroutput"><span class="identifier">syntax_option_type</span></tt></a>), for example:
|
||||
the flag <code class="computeroutput"><span class="identifier">basic</span></code> to the regex
|
||||
constructor (see <a href="../ref/syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>), for example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="comment">// e1 is a case sensitive POSIX-Basic expression:
|
||||
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Basic expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">);</span>
|
||||
<span class="comment">// e2 a case insensitive POSIX-Basic expression:
|
||||
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="boost_regex.posix_basic"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h3>
|
||||
<a name="id475467"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
|
||||
<a name="id519171"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
|
||||
Basic Syntax</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
In POSIX-Basic regular expressions, all characters are match themselves except
|
||||
for the following special characters:
|
||||
</p>
|
||||
<pre class="programlisting">.[\*^$</pre>
|
||||
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h4>
|
||||
<a name="id475508"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
|
||||
<a name="id519210"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
The single character '.' when used outside of a character set will match
|
||||
any single character except:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
The NULL character when the flag <tt class="computeroutput"><span class="identifier">match_no_dot_null</span></tt>
|
||||
The NULL character when the flag <code class="computeroutput"><span class="identifier">match_no_dot_null</span></code>
|
||||
is passed to the matching algorithms.
|
||||
</li>
|
||||
<li>
|
||||
The newline character when the flag <tt class="computeroutput"><span class="identifier">match_not_dot_newline</span></tt>
|
||||
The newline character when the flag <code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code>
|
||||
is passed to the matching algorithms.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h4>
|
||||
<a name="id475578"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
|
||||
<a name="id519279"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
A '^' character shall match the start of a line when used as the first character
|
||||
of an expression, or the first character of a sub-expression.
|
||||
@ -88,30 +84,30 @@
|
||||
A '$' character shall match the end of a line when used as the last character
|
||||
of an expression, or the last character of a sub-expression.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h4>
|
||||
<a name="id475615"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
|
||||
<a name="id519316"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
|
||||
sub-expressions:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
A section beginning <tt class="computeroutput"><span class="special">\(</span></tt> and ending
|
||||
<tt class="computeroutput"><span class="special">\)</span></tt> acts as a marked sub-expression.
|
||||
A section beginning <code class="computeroutput"><span class="special">\(</span></code> and ending
|
||||
<code class="computeroutput"><span class="special">\)</span></code> acts as a marked sub-expression.
|
||||
Whatever matched the sub-expression is split out in a separate field by the
|
||||
matching algorithms. Marked sub-expressions can also repeated, or referred-to
|
||||
by a back-reference.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h4>
|
||||
<a name="id475674"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
|
||||
<a name="id519372"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
Any atom (a single character, a marked sub-expression, or a character class)
|
||||
can be repeated with the * operator.
|
||||
</p>
|
||||
<p>
|
||||
For example <tt class="computeroutput"><span class="identifier">a</span><span class="special">*</span></tt>
|
||||
For example <code class="computeroutput"><span class="identifier">a</span><span class="special">*</span></code>
|
||||
will match any number of letter a's repeated zero or more times (an atom
|
||||
repeated zero times matches an empty string), so the expression <tt class="computeroutput"><span class="identifier">a</span><span class="special">*</span><span class="identifier">b</span></tt>
|
||||
repeated zero times matches an empty string), so the expression <code class="computeroutput"><span class="identifier">a</span><span class="special">*</span><span class="identifier">b</span></code>
|
||||
will match any of the following:
|
||||
</p>
|
||||
<pre class="programlisting">b
|
||||
@ -122,15 +118,15 @@ aaaaaaaab
|
||||
An atom can also be repeated with a bounded repeat:
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">\}</span></tt> Matches
|
||||
<code class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">\}</span></code> Matches
|
||||
'a' repeated exactly n times.
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,\}</span></tt> Matches
|
||||
<code class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,\}</span></code> Matches
|
||||
'a' repeated n or more times.
|
||||
</p>
|
||||
<p>
|
||||
<tt class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">\}</span></tt> Matches 'a' repeated between n and m times
|
||||
<code class="computeroutput"><span class="identifier">a</span><span class="special">\{</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">\}</span></code> Matches 'a' repeated between n and m times
|
||||
inclusive.
|
||||
</p>
|
||||
<p>
|
||||
@ -158,10 +154,10 @@ aaaa
|
||||
Will raise an error, as there is nothing for the * operator to be applied
|
||||
to.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h4>
|
||||
<a name="id475920"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
|
||||
<a name="id519616"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
An escape character followed by a digit <span class="emphasis"><em>n</em></span>, where <span class="emphasis"><em>n</em></span>
|
||||
is in the range 1-9, matches the same string that was matched by sub-expression
|
||||
@ -176,11 +172,11 @@ aaaa
|
||||
But not the string:
|
||||
</p>
|
||||
<pre class="programlisting">aaabba</pre>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h4>
|
||||
<a name="id475996"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
|
||||
<a name="id519690"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
|
||||
sets:</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
A character set is a bracket-expression starting with [ and ending with ],
|
||||
it defines a set of characters, and matches any single character that is
|
||||
@ -189,69 +185,68 @@ aaaa
|
||||
<p>
|
||||
A bracket expression may contain any combination of the following:
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h5>
|
||||
<a name="id476034"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
|
||||
<a name="id519726"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
|
||||
characters:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
For example <tt class="computeroutput"><span class="special">[</span><span class="identifier">abc</span><span class="special">]</span></tt>, will match any of the characters 'a', 'b',
|
||||
For example <code class="computeroutput"><span class="special">[</span><span class="identifier">abc</span><span class="special">]</span></code>, will match any of the characters 'a', 'b',
|
||||
or 'c'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h5>
|
||||
<a name="id476086"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
|
||||
<a name="id519777"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
|
||||
ranges:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
For example <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></tt>
|
||||
For example <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></code>
|
||||
will match any single character in the range 'a' to 'c'. By default, for
|
||||
POSIX-Basic regular expressions, a character <span class="emphasis"><em>x</em></span> is within
|
||||
the range <span class="emphasis"><em>y</em></span> to <span class="emphasis"><em>z</em></span>, if it collates
|
||||
within that range; this results in locale specific behavior. This behavior
|
||||
can be turned off by unsetting the <tt class="computeroutput"><span class="identifier">collate</span></tt>
|
||||
can be turned off by unsetting the <code class="computeroutput"><span class="identifier">collate</span></code>
|
||||
option flag when constructing the regular expression - in which case whether
|
||||
a character appears within a range is determined by comparing the code points
|
||||
of the characters only.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h5>
|
||||
<a name="id476179"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
|
||||
<a name="id519868"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
If the bracket-expression begins with the ^ character, then it matches the
|
||||
complement of the characters it contains, for example <tt class="computeroutput"><span class="special">[^</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></tt> matches any character that is not in the
|
||||
complement of the characters it contains, for example <code class="computeroutput"><span class="special">[^</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">]</span></code> matches any character that is not in the
|
||||
range a-c.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h5>
|
||||
<a name="id476241"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
|
||||
<a name="id519929"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
|
||||
classes:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
An expression of the form <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></tt>
|
||||
matches the named character class "name", for example <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></tt> matches any lower case character. See
|
||||
<a href="character_classes.html" title=" Character Class
|
||||
Names">character class names</a>.
|
||||
An expression of the form <code class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></code>
|
||||
matches the named character class "name", for example <code class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></code> matches any lower case character. See
|
||||
<a href="character_classes.html" title="Character Class Names">character class names</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h5>
|
||||
<a name="id476326"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
|
||||
<a name="id520012"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
|
||||
Elements:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
An expression of the form <tt class="computeroutput"><span class="special">[[.</span><span class="identifier">col</span><span class="special">.]</span></tt> matches
|
||||
An expression of the form <code class="computeroutput"><span class="special">[[.</span><span class="identifier">col</span><span class="special">.]</span></code> matches
|
||||
the collating element <span class="emphasis"><em>col</em></span>. A collating element is any
|
||||
single character, or any sequence of characters that collates as a single
|
||||
unit. Collating elements may also be used as the end point of a range, for
|
||||
example: <tt class="computeroutput"><span class="special">[[.</span><span class="identifier">ae</span><span class="special">.]-</span><span class="identifier">c</span><span class="special">]</span></tt>
|
||||
example: <code class="computeroutput"><span class="special">[[.</span><span class="identifier">ae</span><span class="special">.]-</span><span class="identifier">c</span><span class="special">]</span></code>
|
||||
matches the character sequence "ae", plus any single character
|
||||
in the rangle "ae"-c, assuming that "ae" is treated as
|
||||
a single collating element in the current locale.
|
||||
</p>
|
||||
<p>
|
||||
Collating elements may be used in place of escapes (which are not normally
|
||||
allowed inside character sets), for example <tt class="computeroutput"><span class="special">[[.^.]</span><span class="identifier">abc</span><span class="special">]</span></tt> would
|
||||
allowed inside character sets), for example <code class="computeroutput"><span class="special">[[.^.]</span><span class="identifier">abc</span><span class="special">]</span></code> would
|
||||
match either one of the characters 'abc^'.
|
||||
</p>
|
||||
<p>
|
||||
@ -260,38 +255,38 @@ aaaa
|
||||
</p>
|
||||
<pre class="programlisting">[[.NUL.]]</pre>
|
||||
<p>
|
||||
matches a 'NUL' character. See <a href="collating_names.html" title=" Collating Names">collating
|
||||
matches a 'NUL' character. See <a href="collating_names.html" title="Collating Names">collating
|
||||
element names</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h5>
|
||||
<a name="id476472"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
|
||||
<a name="id520161"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
|
||||
classes:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
An expression of theform <tt class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></tt>,
|
||||
An expression of theform <code class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></code>,
|
||||
matches any character or collating element whose primary sort key is the
|
||||
same as that for collating element <span class="emphasis"><em>col</em></span>, as with collating
|
||||
elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title=" Collating Names">collating
|
||||
elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title="Collating Names">collating
|
||||
symbolic name</a>. A primary sort key is one that ignores case, accentation,
|
||||
or locale-specific tailorings; so for example <tt class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></tt> matches
|
||||
or locale-specific tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
|
||||
any of the characters: a, <20>, <20>, <20>, <20>, <20>, <20>, A, <20>, <20>, <20>, <20>, <20> and <20>. Unfortunately implementation
|
||||
of this is reliant on the platform's collation and localisation support;
|
||||
this feature can not be relied upon to work portably across all platforms,
|
||||
or even all locales on one platform.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h5>
|
||||
<a name="id476585"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
|
||||
<a name="id520265"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
|
||||
</h5>
|
||||
</h6>
|
||||
<p>
|
||||
All of the above can be combined in one character set declaration, for example:
|
||||
<tt class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></tt>
|
||||
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></code>
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.escapes"></a><h4>
|
||||
<a name="id476664"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
|
||||
<a name="id520343"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
With the exception of the escape sequences \{, \}, \(, and \), which are
|
||||
documented above, an escape followed by any character matches that character.
|
||||
@ -300,37 +295,35 @@ aaaa
|
||||
<pre class="programlisting">.[\*^$</pre>
|
||||
<p>
|
||||
"ordinary". Note that the escape character loses its special meaning
|
||||
inside a character set, so <tt class="computeroutput"><span class="special">[\^]</span></tt>
|
||||
inside a character set, so <code class="computeroutput"><span class="special">[\^]</span></code>
|
||||
will match either a literal '\' or a '^'.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h3>
|
||||
<a name="id476723"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
|
||||
<a name="id520400"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
|
||||
Matched</a>
|
||||
</h3>
|
||||
<p>
|
||||
When there is more that one way to match a regular expression, the "best"
|
||||
possible match is obtained using the <a href="leftmost_longest_rule.html" title=" The Leftmost
|
||||
Longest Rule">leftmost-longest
|
||||
rule</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.variations"></a><h3>
|
||||
<a name="id476764"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
|
||||
</h3>
|
||||
<a name="boost_regex.grep_syntax"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.grep"></a><h4>
|
||||
<a name="id476798"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
|
||||
</h4>
|
||||
<p>
|
||||
When an expression is compiled with the flag <tt class="computeroutput"><span class="identifier">grep</span></tt>
|
||||
When there is more that one way to match a regular expression, the "best"
|
||||
possible match is obtained using the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
|
||||
rule</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
|
||||
<a name="id520440"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
|
||||
</h4>
|
||||
<a name="boost_regex.grep_syntax"></a><p>
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
|
||||
<a name="id520473"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
|
||||
</h5>
|
||||
<p>
|
||||
When an expression is compiled with the flag <code class="computeroutput"><span class="identifier">grep</span></code>
|
||||
set, then the expression is treated as a newline separated list of <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic expressions</a>, a match
|
||||
is found if any of the expressions in the list match, for example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">grep</span><span class="special">);</span>
|
||||
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">grep</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
will match either of the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic
|
||||
@ -339,10 +332,10 @@ aaaa
|
||||
<p>
|
||||
As its name suggests, this behavior is consistent with the Unix utility grep.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.emacs"></a><h4>
|
||||
<a name="id476945"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
|
||||
<a name="id520616"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
In addition to the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic features</a>
|
||||
the following characters are also special:
|
||||
@ -616,31 +609,27 @@ aaaa
|
||||
according to the <a href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl
|
||||
"depth first search" rules</a>. Emacs expressions are matched
|
||||
this way because they contain Perl-like extensions, that do not interact
|
||||
well with the <a href="leftmost_longest_rule.html" title=" The Leftmost
|
||||
Longest Rule">POSIX-style
|
||||
well with the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">POSIX-style
|
||||
leftmost-longest rule</a>.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.options"></a><h3>
|
||||
<a name="id477441"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.options"></a><h4>
|
||||
<a name="id521112"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
There are a <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="
|
||||
Options for POSIX Basic Regular Expressions">variety
|
||||
of flags</a> that may be combined with the <tt class="computeroutput"><span class="identifier">basic</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">grep</span></tt> options when constructing
|
||||
the regular expression, in particular note that the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="
|
||||
Options for POSIX Basic Regular Expressions"><tt class="computeroutput"><span class="identifier">newline_alt</span></tt>, <tt class="computeroutput"><span class="identifier">no_char_classes</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">no</span><span class="special">-</span><span class="identifier">intervals</span></tt>, <tt class="computeroutput"><span class="identifier">bk_plus_qm</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">bk_plus_vbar</span></tt></a> options
|
||||
all alter the syntax, while the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="
|
||||
Options for POSIX Basic Regular Expressions"><tt class="computeroutput"><span class="identifier">collate</span></tt> and <tt class="computeroutput"><span class="identifier">icase</span></tt>
|
||||
There are a <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">variety
|
||||
of flags</a> that may be combined with the <code class="computeroutput"><span class="identifier">basic</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">grep</span></code> options when constructing
|
||||
the regular expression, in particular note that the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">newline_alt</span></code>, <code class="computeroutput"><span class="identifier">no_char_classes</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">no</span><span class="special">-</span><span class="identifier">intervals</span></code>, <code class="computeroutput"><span class="identifier">bk_plus_qm</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">bk_plus_vbar</span></code></a> options
|
||||
all alter the syntax, while the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> and <code class="computeroutput"><span class="identifier">icase</span></code>
|
||||
options</a> modify how the case and locale sensitivity are to be applied.
|
||||
</p>
|
||||
<a name="boost_regex.syntax.basic_syntax.references"></a><h3>
|
||||
<a name="id477617"></a>
|
||||
<a name="boost_regex.syntax.basic_syntax.references"></a><h4>
|
||||
<a name="id521285"></a>
|
||||
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html" target="_top">IEEE
|
||||
Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions
|
||||
@ -657,10 +646,11 @@ aaaa
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Character Class
|
||||
Names</title>
|
||||
<title>Character Class Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax">
|
||||
<link rel="prev" href="basic_syntax.html" title=" POSIX Basic Regular
|
||||
Expression Syntax">
|
||||
<link rel="next" href="character_classes/std_char_clases.html" title="
|
||||
Character Classes that are Always Supported">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax">
|
||||
<link rel="next" href="character_classes/std_char_clases.html" title="Character Classes that are Always Supported">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.character_classes"></a><a href="character_classes.html" title=" Character Class
|
||||
Names"> Character Class
|
||||
Names</a></h3></div></div></div>
|
||||
<a name="boost_regex.syntax.character_classes"></a><a href="character_classes.html" title="Character Class Names"> Character Class
|
||||
Names</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="character_classes/std_char_clases.html">
|
||||
Character Classes that are Always Supported</a></span></dt>
|
||||
@ -39,10 +36,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Character classes that are supported by Unicode Regular Expressions</title>
|
||||
<title>Character classes that are supported by Unicode Regular Expressions</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../character_classes.html" title=" Character Class
|
||||
Names">
|
||||
<link rel="prev" href="std_char_clases.html" title="
|
||||
Character Classes that are Always Supported">
|
||||
<link rel="next" href="../collating_names.html" title=" Collating Names">
|
||||
<link rel="up" href="../character_classes.html" title="Character Class Names">
|
||||
<link rel="prev" href="std_char_clases.html" title="Character Classes that are Always Supported">
|
||||
<link rel="next" href="../collating_names.html" title="Collating Names">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,12 +24,12 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a href="optional_char_class_names.html" title="
|
||||
Character classes that are supported by Unicode Regular Expressions">
|
||||
Character classes that are supported by Unicode Regular Expressions</a></h4></div></div></div>
|
||||
<a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
|
||||
Character classes that are supported by Unicode Regular Expressions</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The following character classes are only supported by Unicode Regular Expressions:
|
||||
that is those that use the <tt class="computeroutput"><span class="identifier">u32regex</span></tt>
|
||||
that is those that use the <code class="computeroutput"><span class="identifier">u32regex</span></code>
|
||||
type. The names used are the same as those from Chapter 4 of the Unicode
|
||||
standard.
|
||||
</p>
|
||||
@ -536,10 +533,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,25 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Character Classes that are Always Supported</title>
|
||||
<title>Character Classes that are Always Supported</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../character_classes.html" title=" Character Class
|
||||
Names">
|
||||
<link rel="prev" href="../character_classes.html" title=" Character Class
|
||||
Names">
|
||||
<link rel="next" href="optional_char_class_names.html" title="
|
||||
Character classes that are supported by Unicode Regular Expressions">
|
||||
<link rel="up" href="../character_classes.html" title="Character Class Names">
|
||||
<link rel="prev" href="../character_classes.html" title="Character Class Names">
|
||||
<link rel="next" href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -28,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.character_classes.std_char_clases"></a><a href="std_char_clases.html" title="
|
||||
Character Classes that are Always Supported">
|
||||
Character Classes that are Always Supported</a></h4></div></div></div>
|
||||
<a name="boost_regex.syntax.character_classes.std_char_clases"></a><a href="std_char_clases.html" title="Character Classes that are Always Supported">
|
||||
Character Classes that are Always Supported</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The following character class names are always supported by Boost.Regex:
|
||||
</p>
|
||||
@ -386,10 +382,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Collating Names</title>
|
||||
<title>Collating Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax">
|
||||
<link rel="prev" href="character_classes/optional_char_class_names.html" title="
|
||||
Character classes that are supported by Unicode Regular Expressions">
|
||||
<link rel="next" href="collating_names/digraphs.html" title=" Digraphs">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="character_classes/optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
|
||||
<link rel="next" href="collating_names/digraphs.html" title="Digraphs">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.collating_names"></a><a href="collating_names.html" title=" Collating Names"> Collating Names</a></h3></div></div></div>
|
||||
<a name="boost_regex.syntax.collating_names"></a><a href="collating_names.html" title="Collating Names"> Collating Names</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="collating_names/digraphs.html"> Digraphs</a></span></dt>
|
||||
<dt><span class="section"><a href="collating_names/posix_symbolic_names.html">
|
||||
@ -36,10 +36,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,22 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Digraphs</title>
|
||||
<title>Digraphs</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../collating_names.html" title=" Collating Names">
|
||||
<link rel="prev" href="../collating_names.html" title=" Collating Names">
|
||||
<link rel="next" href="posix_symbolic_names.html" title="
|
||||
POSIX Symbolic Names">
|
||||
<link rel="up" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="prev" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="next" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -25,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.collating_names.digraphs"></a><a href="digraphs.html" title=" Digraphs"> Digraphs</a></h4></div></div></div>
|
||||
<a name="boost_regex.syntax.collating_names.digraphs"></a><a href="digraphs.html" title="Digraphs"> Digraphs</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The following are treated as valid digraphs when used as a collating name:
|
||||
</p>
|
||||
@ -47,10 +47,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,24 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
Named Unicode Characters</title>
|
||||
<title>Named Unicode Characters</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../collating_names.html" title=" Collating Names">
|
||||
<link rel="prev" href="posix_symbolic_names.html" title="
|
||||
POSIX Symbolic Names">
|
||||
<link rel="next" href="../leftmost_longest_rule.html" title=" The Leftmost
|
||||
Longest Rule">
|
||||
<link rel="up" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="prev" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
|
||||
<link rel="next" href="../leftmost_longest_rule.html" title="The Leftmost Longest Rule">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -27,12 +24,12 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.collating_names.named_unicode"></a><a href="named_unicode.html" title="
|
||||
Named Unicode Characters">
|
||||
Named Unicode Characters</a></h4></div></div></div>
|
||||
<a name="boost_regex.syntax.collating_names.named_unicode"></a><a href="named_unicode.html" title="Named Unicode Characters">
|
||||
Named Unicode Characters</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
When using <a href="../../unicode.html" title=" Unicode and Boost.Regex">Unicode aware regular expressions</a>
|
||||
(with the <tt class="computeroutput"><span class="identifier">u32regex</span></tt> type),
|
||||
When using <a href="../../unicode.html" title="Unicode and Boost.Regex">Unicode aware regular expressions</a>
|
||||
(with the <code class="computeroutput"><span class="identifier">u32regex</span></code> type),
|
||||
all the normal symbolic names for Unicode characters (those given in Unidata.txt)
|
||||
are recognised. So for example:
|
||||
</p>
|
||||
@ -43,10 +40,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>
|
||||
POSIX Symbolic Names</title>
|
||||
<title>POSIX Symbolic Names</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../collating_names.html" title=" Collating Names">
|
||||
<link rel="prev" href="digraphs.html" title=" Digraphs">
|
||||
<link rel="next" href="named_unicode.html" title="
|
||||
Named Unicode Characters">
|
||||
<link rel="up" href="../collating_names.html" title="Collating Names">
|
||||
<link rel="prev" href="digraphs.html" title="Digraphs">
|
||||
<link rel="next" href="named_unicode.html" title="Named Unicode Characters">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a href="posix_symbolic_names.html" title="
|
||||
POSIX Symbolic Names">
|
||||
POSIX Symbolic Names</a></h4></div></div></div>
|
||||
<a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a href="posix_symbolic_names.html" title="POSIX Symbolic Names">
|
||||
POSIX Symbolic Names</a>
|
||||
</h4></div></div></div>
|
||||
<p>
|
||||
The following symbolic names are recognised as valid collating element
|
||||
names, in addition to any single character, this allows you to write for
|
||||
@ -973,10 +971,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> The Leftmost
|
||||
Longest Rule</title>
|
||||
<title>The Leftmost Longest Rule</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../syntax.html" title=" Regular Expression Syntax">
|
||||
<link rel="prev" href="collating_names/named_unicode.html" title="
|
||||
Named Unicode Characters">
|
||||
<link rel="next" href="../format.html" title=" Search and Replace Format String Syntax">
|
||||
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
|
||||
<link rel="prev" href="collating_names/named_unicode.html" title="Named Unicode Characters">
|
||||
<link rel="next" href="../format.html" title="Search and Replace Format String Syntax">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,9 +24,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="boost_regex.syntax.leftmost_longest_rule"></a><a href="leftmost_longest_rule.html" title=" The Leftmost
|
||||
Longest Rule"> The Leftmost
|
||||
Longest Rule</a></h3></div></div></div>
|
||||
<a name="boost_regex.syntax.leftmost_longest_rule"></a><a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule"> The Leftmost
|
||||
Longest Rule</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Often there is more than one way of matching a regular expression at a particular
|
||||
location, for POSIX basic and extended regular expressions, the "best"
|
||||
@ -67,10 +65,11 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,23 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title> Unicode and Boost.Regex</title>
|
||||
<title>Unicode and Boost.Regex</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="../index.html" title="Boost.Regex">
|
||||
<link rel="up" href="../index.html" title="Boost.Regex">
|
||||
<link rel="prev" href="introduction_and_overview.html" title="Introduction and
|
||||
Overview">
|
||||
<link rel="next" href="captures.html" title=" Understanding Marked Sub-Expressions
|
||||
and Captures">
|
||||
<link rel="prev" href="introduction_and_overview.html" title="Introduction and Overview">
|
||||
<link rel="next" href="captures.html" title="Understanding Marked Sub-Expressions and Captures">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,57 +24,58 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="boost_regex.unicode"></a><a href="unicode.html" title=" Unicode and Boost.Regex"> Unicode and Boost.Regex</a></h2></div></div></div>
|
||||
<a name="boost_regex.unicode"></a><a href="unicode.html" title="Unicode and Boost.Regex"> Unicode and Boost.Regex</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
There are two ways to use Boost.Regex with Unicode strings:
|
||||
</p>
|
||||
<a name="boost_regex.unicode.rely_on_wchar_t"></a><h4>
|
||||
<a name="id458749"></a>
|
||||
<a name="boost_regex.unicode.rely_on_wchar_t"></a><h5>
|
||||
<a name="id502629"></a>
|
||||
<a href="unicode.html#boost_regex.unicode.rely_on_wchar_t">Rely on wchar_t</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
If your platform's <tt class="computeroutput"><span class="keyword">wchar_t</span></tt> type
|
||||
If your platform's <code class="computeroutput"><span class="keyword">wchar_t</span></code> type
|
||||
can hold Unicode strings, and your platform's C/C++ runtime correctly handles
|
||||
wide character constants (when passed to <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswspace</span></tt>
|
||||
<tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswlower</span></tt> etc), then you can use <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span></tt>
|
||||
wide character constants (when passed to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswspace</span></code>
|
||||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iswlower</span></code> etc), then you can use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">wregex</span></code>
|
||||
to process Unicode. However, there are several disadvantages to this approach:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
It's not portable: there's no guarantee on the width of <tt class="computeroutput"><span class="keyword">wchar_t</span></tt>,
|
||||
It's not portable: there's no guarantee on the width of <code class="computeroutput"><span class="keyword">wchar_t</span></code>,
|
||||
or even whether the runtime treats wide characters as Unicode at all, most
|
||||
Windows compilers do so, but many Unix systems do not.
|
||||
</li>
|
||||
<li>
|
||||
There's no support for Unicode-specific character classes: <tt class="computeroutput"><span class="special">[[:</span><span class="identifier">Nd</span><span class="special">:]]</span></tt>,
|
||||
<tt class="computeroutput"><span class="special">[[:</span><span class="identifier">Po</span><span class="special">:]]</span></tt> etc.
|
||||
There's no support for Unicode-specific character classes: <code class="computeroutput"><span class="special">[[:</span><span class="identifier">Nd</span><span class="special">:]]</span></code>,
|
||||
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">Po</span><span class="special">:]]</span></code> etc.
|
||||
</li>
|
||||
<li>
|
||||
You can only search strings that are encoded as sequences of wide characters,
|
||||
it is not possible to search UTF-8, or even UTF-16 on many platforms.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h4>
|
||||
<a name="id458932"></a>
|
||||
<a name="boost_regex.unicode.use_a_unicode_aware_regular_expression_type_"></a><h5>
|
||||
<a name="id502813"></a>
|
||||
<a href="unicode.html#boost_regex.unicode.use_a_unicode_aware_regular_expression_type_">Use
|
||||
a Unicode Aware Regular Expression Type.</a>
|
||||
</h4>
|
||||
</h5>
|
||||
<p>
|
||||
If you have the <a href="http://www.ibm.com/software/globalization/icu/" target="_top">ICU
|
||||
library</a>, then Boost.Regex can be <a href="install.html#boost_regex.install.building_with_unicode_and_icu_support">configured
|
||||
to make use of it</a>, and provide a distinct regular expression type (boost::u32regex),
|
||||
that supports both Unicode specific character properties, and the searching
|
||||
of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: <a href="ref/non_std_strings/icu.html" title=" Working With
|
||||
Unicode and ICU String Types">ICU
|
||||
of text that is encoded in either UTF-8, UTF-16, or UTF-32. See: <a href="ref/non_std_strings/icu.html" title="Working With Unicode and ICU String Types">ICU
|
||||
string class support</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p></small></div></td>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
|
@ -3,17 +3,17 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Boost.Regex</title>
|
||||
<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||||
<link rel="start" href="index.html" title="Boost.Regex">
|
||||
<link rel="next" href="boost_regex/configuration.html" title=" Configuration">
|
||||
<link rel="next" href="boost_regex/configuration.html" title="Configuration">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -26,9 +26,9 @@
|
||||
<div><div class="authorgroup"><div class="author"><h3 class="author">
|
||||
<span class="firstname">John</span> <span class="surname">Maddock</span>
|
||||
</h3></div></div></div>
|
||||
<div><p class="copyright">Copyright <20> 2007 John Maddock</p></div>
|
||||
<div><p class="copyright">Copyright <20> 1998 -2007 John Maddock</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id385571"></a><p>
|
||||
<a name="id445742"></a><p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
@ -155,7 +155,7 @@
|
||||
<dt><span class="section"><a href="boost_regex/ref/concepts/traits_concept.html"> Traits Class
|
||||
Requirements</a></span></dt>
|
||||
<dt><span class="section"><a href="boost_regex/ref/concepts/iterator_concepts.html"> Iterator
|
||||
Rrequirements</a></span></dt>
|
||||
Requirements</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="boost_regex/ref/deprecated_interfaces.html">Deprecated Interfaces</a></span></dt>
|
||||
<dd><dl>
|
||||
@ -191,19 +191,13 @@
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
A printer-friendly <a href="http://svn.boost.org/svn/boost/sandbox/pdf/regex/release/regex.pdf" target="_top">PDF
|
||||
version of this manual is also available</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: November 07, 2007 at 02:57:53 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"><small></small></div></td>
|
||||
<td align="left"><p><small>Last revised: July 25, 2008 at 09:01:43 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav"><a accesskey="n" href="boost_regex/configuration.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
|
||||
|
@ -74,7 +74,7 @@ This flag is used when matching incomplete or very long texts, see the partial m
|
||||
[[match_single_line][Equivalent to the inverse of Perl's m/ modifier; prevents ^ from matching after an embedded newline character (so that it only matches at the start of the text being matched), and $ from matching before an embedded newline (so that it only matches at the end of the text being matched).]]
|
||||
[[match_prev_avail][Specifies that --first is a valid iterator position, when this flag is set then the flags match_not_bol and match_not_bow are ignored by the regular expression algorithms (RE.7) and iterators (RE.8).]]
|
||||
[[match_not_dot_newline][Specifies that the expression "." does not match a newline character. This is the inverse of Perl's s/ modifier.]]
|
||||
[[match_not_dot_null][Specified that the expression "." does not match a character null '\\0'.]]
|
||||
[[match_not_dot_null][Specifies that the expression "." does not match a character null '\\0'.]]
|
||||
[[match_posix][Specifies that the expression should be matched according to the POSIX
|
||||
[link boost_regex.syntax.leftmost_longest_rule leftmost-longest rule],
|
||||
regardless of what kind of expression was compiled.
|
||||
@ -108,7 +108,7 @@ This flag is used when matching incomplete or very long texts, see the partial m
|
||||
[[format_perl][Specifies that when a regular expression match is to be replaced by
|
||||
a new string, that the new string is constructed using
|
||||
[link boost_regex.format.perl_format the same rules as Perl 5].]]
|
||||
[[format_literal][Specified that when a regular expression match is to be
|
||||
[[format_literal][Specifies that when a regular expression match is to be
|
||||
replaced by a new string, that the new string is a literal copy of
|
||||
the replacement text.]]
|
||||
[[format_all][Specifies that all syntax extensions are enabled, including
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[article Boost.Regex
|
||||
[quickbook 1.3]
|
||||
[copyright 2007 John Maddock]
|
||||
[copyright 1998-2007 John Maddock]
|
||||
[purpose Regular Expressions]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
@ -45,6 +45,10 @@
|
||||
[template regerror[] [link boost_regex.ref.posix.regerror `regerror`]]
|
||||
[template regfree[] [link boost_regex.ref.posix.regfree `regfree`]]
|
||||
|
||||
A printer-friendly
|
||||
[@http://svn.boost.org/svn/boost/sandbox/pdf/regex/release/regex.pdf
|
||||
PDF version of this manual is also available].
|
||||
|
||||
[include configuration.qbk]
|
||||
[include install.qbk]
|
||||
[include introduction.qbk]
|
||||
|
@ -20,10 +20,10 @@
|
||||
struct c_regex_traits;
|
||||
|
||||
template <class charT>
|
||||
struct cpp_regex_traits;
|
||||
class cpp_regex_traits;
|
||||
|
||||
template <class charT>
|
||||
struct w32_regex_traits;
|
||||
class w32_regex_traits;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
@ -34,7 +34,7 @@ The single character '.' when used outside of a character set will match
|
||||
any single character except:
|
||||
|
||||
* The NULL character when the [link boost_regex.ref.match_flag_type flag
|
||||
`match_no_dot_null`] is passed to the matching algorithms.
|
||||
`match_not_dot_null`] is passed to the matching algorithms.
|
||||
* The newline character when the [link boost_regex.ref.match_flag_type
|
||||
flag `match_not_dot_newline`] is passed to
|
||||
the matching algorithms.
|
||||
|
703
doc/vc71-performance.html
Normal file
703
doc/vc71-performance.html
Normal file
@ -0,0 +1,703 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Regular Expression Performance Comparison</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<meta name="Template" content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
</head>
|
||||
<body bgcolor="#ffffff" link="#0000ff" vlink="#800080">
|
||||
<h2>Regular Expression Performance Comparison</h2>
|
||||
<p>
|
||||
The following tables provide comparisons between the following regular
|
||||
expression libraries:</p>
|
||||
<p><a href="http://research.microsoft.com/projects/greta">GRETA</a>.</p>
|
||||
<p><a href="http://www.boost.org/">The Boost regex library</a>.</p>
|
||||
<p><a href="http://arglist.com/regex/">Henry Spencer's regular expression library</a>
|
||||
- this is provided for comparison as a typical non-backtracking implementation.</p>
|
||||
<P>Philip Hazel's <A href="http://www.pcre.org">PCRE</A> library.</P>
|
||||
<H3>Details</H3>
|
||||
<P>Machine: Intel Pentium 4 2.8GHz PC.</P>
|
||||
<P>Compiler: Microsoft Visual C++ version 7.1.</P>
|
||||
<P>C++ Standard Library: Dinkumware standard library version 313.</P>
|
||||
<P>OS: Win32.</P>
|
||||
<P>Boost version: 1.31.0.</P>
|
||||
<P>PCRE version: 3.9.</P>
|
||||
<P>
|
||||
As ever care should be taken in interpreting the results, only sensible regular
|
||||
expressions (rather than pathological cases) are given, most are taken from the
|
||||
Boost regex examples, or from the <a href="http://www.regxlib.com/">Library of
|
||||
Regular Expressions</a>. In addition, some variation in the relative
|
||||
performance of these libraries can be expected on other machines - as memory
|
||||
access and processor caching effects can be quite large for most finite state
|
||||
machine algorithms.</P>
|
||||
<H3>Averages</H3>
|
||||
<P>The following are the average relative scores for all the tests: the perfect
|
||||
regular expression library would score 1, in practice any small number
|
||||
(say less that 4 or 5) is pretty good.</P>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<BR>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2.31619</td>
|
||||
<td>6.14203</td>
|
||||
<td>2.30668</td>
|
||||
<td>1.94363</td>
|
||||
<td>124.752</td>
|
||||
<td>2.09365</td>
|
||||
</tr>
|
||||
</table>
|
||||
</P>
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="http://www.gutenberg.org/files/3200/old/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<BR>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.0407s)</font></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.0407s)</font></td>
|
||||
<td>4.18<BR>
|
||||
(0.17s)</td>
|
||||
<td>4.18<BR>
|
||||
(0.17s)</td>
|
||||
<td>135<BR>
|
||||
(5.48s)</td>
|
||||
<td>1.37<BR>
|
||||
(0.0557s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td><font color="#008000">1.02<BR>
|
||||
(0.0381s)</font></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.0375s)</font></td>
|
||||
<td>4.53<BR>
|
||||
(0.17s)</td>
|
||||
<td>4.54<BR>
|
||||
(0.17s)</td>
|
||||
<td>166<BR>
|
||||
(6.23s)</td>
|
||||
<td>1.34<BR>
|
||||
(0.0501s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td>4.3<BR>
|
||||
(4.18s)</td>
|
||||
<td>9.93<BR>
|
||||
(9.65s)</td>
|
||||
<td>1.15<BR>
|
||||
(1.12s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.972s)</font></td>
|
||||
<td>8.15<BR>
|
||||
(7.92s)</td>
|
||||
<td>5.85<BR>
|
||||
(5.69s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td>6.25<BR>
|
||||
(1.84s)</td>
|
||||
<td>20.9<BR>
|
||||
(6.16s)</td>
|
||||
<td>1.56<BR>
|
||||
(0.461s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.295s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.58<BR>
|
||||
(0.761s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td>6.53<BR>
|
||||
(0.711s)</td>
|
||||
<td>11.5<BR>
|
||||
(1.25s)</td>
|
||||
<td>2.3<BR>
|
||||
(0.251s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.109s)</font></td>
|
||||
<td>196<BR>
|
||||
(21.4s)</td>
|
||||
<td>1.77<BR>
|
||||
(0.193s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>(Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td>3.88<BR>
|
||||
(0.972s)</td>
|
||||
<td>6.48<BR>
|
||||
(1.62s)</td>
|
||||
<td>1.66<BR>
|
||||
(0.416s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.251s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.48<BR>
|
||||
(0.62s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</P>
|
||||
<h3>Comparison 2: Medium Sized Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a medium sized English language text was
|
||||
measured (the first 50K from mtent12.txt). </p>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<BR>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(9.05e-005s)</font></td>
|
||||
<td><font color="#008000">1.03<BR>
|
||||
(9.29e-005s)</font></td>
|
||||
<td>4.92<BR>
|
||||
(0.000445s)</td>
|
||||
<td>4.92<BR>
|
||||
(0.000445s)</td>
|
||||
<td>43.2<BR>
|
||||
(0.00391s)</td>
|
||||
<td>3.18<BR>
|
||||
(0.000288s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(8.56e-005s)</font></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(8.56e-005s)</font></td>
|
||||
<td>4.97<BR>
|
||||
(0.000425s)</td>
|
||||
<td>4.98<BR>
|
||||
(0.000426s)</td>
|
||||
<td>2.8<BR>
|
||||
(0.000239s)</td>
|
||||
<td>2.2<BR>
|
||||
(0.000188s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td>5.29<BR>
|
||||
(0.011s)</td>
|
||||
<td>11.8<BR>
|
||||
(0.0244s)</td>
|
||||
<td>1.19<BR>
|
||||
(0.00246s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.00207s)</font></td>
|
||||
<td>8.77<BR>
|
||||
(0.0182s)</td>
|
||||
<td>6.88<BR>
|
||||
(0.0142s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td>5.98<BR>
|
||||
(0.00462s)</td>
|
||||
<td>20.2<BR>
|
||||
(0.0156s)</td>
|
||||
<td>1.54<BR>
|
||||
(0.00119s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.000772s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.53<BR>
|
||||
(0.00195s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td>3.42<BR>
|
||||
(0.00207s)</td>
|
||||
<td>6.31<BR>
|
||||
(0.00383s)</td>
|
||||
<td>1.71<BR>
|
||||
(0.00104s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.000606s)</font></td>
|
||||
<td>81.5<BR>
|
||||
(0.0494s)</td>
|
||||
<td>1.96<BR>
|
||||
(0.00119s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>(Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td>1.97<BR>
|
||||
(0.00266s)</td>
|
||||
<td>3.77<BR>
|
||||
(0.00509s)</td>
|
||||
<td>1.38<BR>
|
||||
(0.00186s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.00135s)</font></td>
|
||||
<td>297<BR>
|
||||
(0.401s)</td>
|
||||
<td>1.77<BR>
|
||||
(0.00238s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</P>
|
||||
<H3>Comparison 3: C++ Code Search</H3>
|
||||
<P>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the C++ source file <A href="../../../boost/crc.hpp">
|
||||
boost/crc.hpp</A> was measured. </P>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<BR>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([
|
||||
]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?(\{|:[^;\{()]*\{)</code></td>
|
||||
<td>6.67<BR>
|
||||
(0.00147s)</td>
|
||||
<td>36.9<BR>
|
||||
(0.00813s)</td>
|
||||
<td><font color="#008000">1.03<BR>
|
||||
(0.000227s)</font></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.00022s)</font></td>
|
||||
<td>557<BR>
|
||||
(0.123s)</td>
|
||||
<td>2.57<BR>
|
||||
(0.000566s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>(^[
|
||||
]*#(?:[^\\\n]|\\[^\n_[:punct:][:alnum:]]*[\n[:punct:][:word:]])*)|(//[^\n]*|/\*.*?\*/)|\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\>|('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*")|\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\></code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.00555s)</font></td>
|
||||
<td>3.32<BR>
|
||||
(0.0185s)</td>
|
||||
<td>2.53<BR>
|
||||
(0.0141s)</td>
|
||||
<td>1.94<BR>
|
||||
(0.0108s)</td>
|
||||
<td>NA</td>
|
||||
<td>3.38<BR>
|
||||
(0.0188s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("[^"]+"|<[^>]+>)</code></td>
|
||||
<td>4.77<BR>
|
||||
(0.00156s)</td>
|
||||
<td>24.8<BR>
|
||||
(0.00814s)</td>
|
||||
<td>1.13<BR>
|
||||
(0.000372s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.000328s)</font></td>
|
||||
<td>120<BR>
|
||||
(0.0394s)</td>
|
||||
<td>1.58<BR>
|
||||
(0.000518s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("boost/[^"]+"|<boost/[^>]+>)</code></td>
|
||||
<td>4.72<BR>
|
||||
(0.00154s)</td>
|
||||
<td>24.8<BR>
|
||||
(0.00813s)</td>
|
||||
<td>1.12<BR>
|
||||
(0.000367s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.000328s)</font></td>
|
||||
<td>143<BR>
|
||||
(0.0469s)</td>
|
||||
<td>1.58<BR>
|
||||
(0.000518s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</P>
|
||||
<H3>
|
||||
<H3>Comparison 4: HTML Document Search</H3>
|
||||
</H3>
|
||||
<P>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the html file <A href="../../libraries.htm">libs/libraries.htm</A>
|
||||
was measured. </P>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<BR>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>beman|john|dave</code></td>
|
||||
<td>4.07<BR>
|
||||
(0.00111s)</td>
|
||||
<td>7.14<BR>
|
||||
(0.00195s)</td>
|
||||
<td>1.75<BR>
|
||||
(0.000479s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.000273s)</font></td>
|
||||
<td>54.3<BR>
|
||||
(0.0149s)</td>
|
||||
<td>1.83<BR>
|
||||
(0.000499s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><p>.*?</p></code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(6.59e-005s)</font></td>
|
||||
<td><font color="#008000">1.04<BR>
|
||||
(6.84e-005s)</font></td>
|
||||
<td>4.15<BR>
|
||||
(0.000273s)</td>
|
||||
<td>4.23<BR>
|
||||
(0.000279s)</td>
|
||||
<td>NA</td>
|
||||
<td>4.23<BR>
|
||||
(0.000279s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><a[^>]+href=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td>1.39<BR>
|
||||
(0.000626s)</td>
|
||||
<td>1.83<BR>
|
||||
(0.000821s)</td>
|
||||
<td>1.41<BR>
|
||||
(0.000636s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.00045s)</font></td>
|
||||
<td>351<BR>
|
||||
(0.158s)</td>
|
||||
<td>1.13<BR>
|
||||
(0.000509s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><h[12345678][^>]*>.*?</h[12345678]></code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(0.000142s)</font></td>
|
||||
<td>1.21<BR>
|
||||
(0.000171s)</td>
|
||||
<td>2.62<BR>
|
||||
(0.000372s)</td>
|
||||
<td>1.48<BR>
|
||||
(0.00021s)</td>
|
||||
<td>NA</td>
|
||||
<td>1.73<BR>
|
||||
(0.000245s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><img[^>]+src=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(5.38e-005s)</font></td>
|
||||
<td><font color="#008000">1.05<BR>
|
||||
(5.63e-005s)</font></td>
|
||||
<td>5<BR>
|
||||
(0.000269s)</td>
|
||||
<td>5.18<BR>
|
||||
(0.000278s)</td>
|
||||
<td>604<BR>
|
||||
(0.0325s)</td>
|
||||
<td>4.05<BR>
|
||||
(0.000218s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><font[^>]+face=("[^"]*"|[^[:space:]]+)[^>]*>.*?</font></code></td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(6.05e-005s)</font></td>
|
||||
<td><font color="#008000">1.09<BR>
|
||||
(6.59e-005s)</font></td>
|
||||
<td>4.45<BR>
|
||||
(0.000269s)</td>
|
||||
<td>4.69<BR>
|
||||
(0.000284s)</td>
|
||||
<td>NA</td>
|
||||
<td>3.64<BR>
|
||||
(0.00022s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</P>
|
||||
<H3>Comparison 3: Simple Matches</H3>
|
||||
<p>
|
||||
For each of the following regular expressions the time taken to match against
|
||||
the text indicated was measured. </p>
|
||||
<P><table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Text</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<BR>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>abc</code></td>
|
||||
<td>abc</td>
|
||||
<td>1.32<BR>
|
||||
(2.24e-007s)</td>
|
||||
<td>1.86<BR>
|
||||
(3.15e-007s)</td>
|
||||
<td>1.25<BR>
|
||||
(2.12e-007s)</td>
|
||||
<td>1.24<BR>
|
||||
(2.1e-007s)</td>
|
||||
<td>2.98<BR>
|
||||
(5.05e-007s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(1.7e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([0-9]+)(\-| |$)(.*)$</code></td>
|
||||
<td>100- this is a line of ftp response which contains a message string</td>
|
||||
<td>1.32<BR>
|
||||
(5.91e-007s)</td>
|
||||
<td>1.96<BR>
|
||||
(8.78e-007s)</td>
|
||||
<td>2.68<BR>
|
||||
(1.2e-006s)</td>
|
||||
<td>1.53<BR>
|
||||
(6.88e-007s)</td>
|
||||
<td>332<BR>
|
||||
(0.000149s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(4.49e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}</code></td>
|
||||
<td>1234-5678-1234-456</td>
|
||||
<td>1.44<BR>
|
||||
(7.16e-007s)</td>
|
||||
<td>2.04<BR>
|
||||
(1.01e-006s)</td>
|
||||
<td>3.35<BR>
|
||||
(1.66e-006s)</td>
|
||||
<td>2.15<BR>
|
||||
(1.07e-006s)</td>
|
||||
<td>31.4<BR>
|
||||
(1.56e-005s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(4.96e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>john@johnmaddock.co.uk</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(1.18e-006s)</font></td>
|
||||
<td>1.42<BR>
|
||||
(1.68e-006s)</td>
|
||||
<td>2.06<BR>
|
||||
(2.44e-006s)</td>
|
||||
<td>1.35<BR>
|
||||
(1.6e-006s)</td>
|
||||
<td>165<BR>
|
||||
(0.000196s)</td>
|
||||
<td><font color="#008000">1.06<BR>
|
||||
(1.26e-006s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>foo12@foo.edu</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(1.09e-006s)</font></td>
|
||||
<td>1.44<BR>
|
||||
(1.57e-006s)</td>
|
||||
<td>2.21<BR>
|
||||
(2.4e-006s)</td>
|
||||
<td>1.41<BR>
|
||||
(1.53e-006s)</td>
|
||||
<td>108<BR>
|
||||
(0.000117s)</td>
|
||||
<td><font color="#008000">1.04<BR>
|
||||
(1.13e-006s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>bob.smith@foo.tv</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(1.07e-006s)</font></td>
|
||||
<td>1.43<BR>
|
||||
(1.53e-006s)</td>
|
||||
<td>2.21<BR>
|
||||
(2.37e-006s)</td>
|
||||
<td>1.45<BR>
|
||||
(1.55e-006s)</td>
|
||||
<td>123<BR>
|
||||
(0.000132s)</td>
|
||||
<td><font color="#008000">1.05<BR>
|
||||
(1.13e-006s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>EH10 2QQ</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(3.19e-007s)</font></td>
|
||||
<td>1.67<BR>
|
||||
(5.34e-007s)</td>
|
||||
<td>1.58<BR>
|
||||
(5.05e-007s)</td>
|
||||
<td>1.4<BR>
|
||||
(4.49e-007s)</td>
|
||||
<td>10.4<BR>
|
||||
(3.32e-006s)</td>
|
||||
<td>1.15<BR>
|
||||
(3.68e-007s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>G1 1AA</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(3.29e-007s)</font></td>
|
||||
<td>1.65<BR>
|
||||
(5.44e-007s)</td>
|
||||
<td>1.51<BR>
|
||||
(4.96e-007s)</td>
|
||||
<td>1.36<BR>
|
||||
(4.49e-007s)</td>
|
||||
<td>8.46<BR>
|
||||
(2.79e-006s)</td>
|
||||
<td>1.1<BR>
|
||||
(3.63e-007s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>SW1 1ZZ</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(3.25e-007s)</font></td>
|
||||
<td>1.64<BR>
|
||||
(5.34e-007s)</td>
|
||||
<td>1.56<BR>
|
||||
(5.05e-007s)</td>
|
||||
<td>1.38<BR>
|
||||
(4.49e-007s)</td>
|
||||
<td>9.29<BR>
|
||||
(3.02e-006s)</td>
|
||||
<td>1.13<BR>
|
||||
(3.68e-007s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>4/1/2001</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(3.44e-007s)</font></td>
|
||||
<td>1.55<BR>
|
||||
(5.34e-007s)</td>
|
||||
<td>2.36<BR>
|
||||
(8.12e-007s)</td>
|
||||
<td>2.2<BR>
|
||||
(7.55e-007s)</td>
|
||||
<td>19.6<BR>
|
||||
(6.72e-006s)</td>
|
||||
<td>1.81<BR>
|
||||
(6.21e-007s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>12/12/2001</td>
|
||||
<td><font color="#008000">1.05<BR>
|
||||
(6.59e-007s)</font></td>
|
||||
<td>1.66<BR>
|
||||
(1.05e-006s)</td>
|
||||
<td>1.44<BR>
|
||||
(9.07e-007s)</td>
|
||||
<td>1.23<BR>
|
||||
(7.73e-007s)</td>
|
||||
<td>11.6<BR>
|
||||
(7.34e-006s)</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(6.3e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>123</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(5.72e-007s)</font></td>
|
||||
<td>1.59<BR>
|
||||
(9.07e-007s)</td>
|
||||
<td>1.6<BR>
|
||||
(9.16e-007s)</td>
|
||||
<td>1.49<BR>
|
||||
(8.5e-007s)</td>
|
||||
<td>6.14<BR>
|
||||
(3.51e-006s)</td>
|
||||
<td>1.22<BR>
|
||||
(6.97e-007s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>+3.14159</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(6.78e-007s)</font></td>
|
||||
<td>1.52<BR>
|
||||
(1.03e-006s)</td>
|
||||
<td>1.47<BR>
|
||||
(9.94e-007s)</td>
|
||||
<td>1.31<BR>
|
||||
(8.88e-007s)</td>
|
||||
<td>10.8<BR>
|
||||
(7.34e-006s)</td>
|
||||
<td><font color="#008000">1.08<BR>
|
||||
(7.35e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>-3.14159</td>
|
||||
<td><font color="#008000">1<BR>
|
||||
(6.78e-007s)</font></td>
|
||||
<td>1.52<BR>
|
||||
(1.03e-006s)</td>
|
||||
<td>1.46<BR>
|
||||
(9.92e-007s)</td>
|
||||
<td>1.32<BR>
|
||||
(8.98e-007s)</td>
|
||||
<td>10.5<BR>
|
||||
(7.11e-006s)</td>
|
||||
<td>1.11<BR>
|
||||
(7.54e-007s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</P>
|
||||
<hr>
|
||||
<p><i><EFBFBD> Copyright John Maddock 2003</i></p>
|
||||
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
||||
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
||||
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -157,7 +157,7 @@ int main()
|
||||
assert(greek == L"\x0391\x039D\x0395\x0398\x0391 2004");
|
||||
|
||||
// extract currency symbols with associated value, use iterator interface:
|
||||
std::string text2 = " $100.23 or \xC2\xA3""198.12 "; // \xC2\xA3 is the <EFBFBD> sign encoded in UTF-8
|
||||
std::string text2 = " $100.23 or \xC2\xA3""198.12 "; // \xC2\xA3 is the pound sign encoded in UTF-8
|
||||
enumerate_currencies(text2);
|
||||
enumerate_currencies2(text2);
|
||||
|
||||
|
@ -65,7 +65,7 @@ istream& getline(istream& is, std::string& s)
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc)
|
||||
int main(int argc, const char*[])
|
||||
{
|
||||
std::string in, out;
|
||||
do
|
||||
|
@ -47,7 +47,7 @@ istream& getline(istream& is, std::string& s)
|
||||
#endif
|
||||
|
||||
|
||||
int main(int argc)
|
||||
int main(int argc, const char*[])
|
||||
{
|
||||
string s;
|
||||
list<string> l;
|
||||
|
@ -40,7 +40,7 @@ istream& getline(istream& is, std::string& s)
|
||||
#endif
|
||||
|
||||
|
||||
int main(int argc)
|
||||
int main(int argc, const char*[])
|
||||
{
|
||||
string s;
|
||||
do{
|
||||
|
@ -324,17 +324,17 @@ int main(int argc, char**argv)
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
// cache load:
|
||||
regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
do{
|
||||
iters *= (tim > 0.001) ? (1.1/tim) : 100;
|
||||
t.restart();
|
||||
for(i = 0; i < iters; ++i)
|
||||
{
|
||||
result = regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
result = regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
}
|
||||
tim = t.elapsed();
|
||||
}while(tim < wait_time);
|
||||
cout << "POSIX regex_tA time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
cout << "POSIX regexecA time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
|
||||
if(result == 0)
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ template <class Regex>
|
||||
struct BaseRegexConcept
|
||||
{
|
||||
typedef typename Regex::value_type value_type;
|
||||
typedef typename Regex::size_type size_type;
|
||||
//typedef typename Regex::size_type size_type;
|
||||
typedef typename Regex::flag_type flag_type;
|
||||
typedef typename Regex::locale_type locale_type;
|
||||
typedef input_iterator_archetype<value_type> input_iterator_type;
|
||||
@ -368,9 +368,7 @@ struct BaseRegexConcept
|
||||
|
||||
// access:
|
||||
const Regex ce;
|
||||
bool b = ce.empty();
|
||||
ignore_unused_variable_warning(b);
|
||||
size_type i = ce.mark_count();
|
||||
unsigned i = ce.mark_count();
|
||||
ignore_unused_variable_warning(i);
|
||||
m_flags = ce.flags();
|
||||
e.imbue(ce.getloc());
|
||||
@ -385,7 +383,7 @@ struct BaseRegexConcept
|
||||
typedef typename sub_match_type::iterator sub_iter_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value));
|
||||
b = m_sub.matched;
|
||||
bool b = m_sub.matched;
|
||||
ignore_unused_variable_warning(b);
|
||||
BidiIterator bi = m_sub.first;
|
||||
ignore_unused_variable_warning(bi);
|
||||
@ -533,7 +531,7 @@ struct BaseRegexConcept
|
||||
|
||||
pointer_type m_pointer;
|
||||
flag_type m_flags;
|
||||
size_type m_size;
|
||||
std::size_t m_size;
|
||||
input_iterator_type in1, in2;
|
||||
const sub_match_type m_sub;
|
||||
const value_type m_char;
|
||||
@ -557,7 +555,7 @@ template <class Regex>
|
||||
struct RegexConcept
|
||||
{
|
||||
typedef typename Regex::value_type value_type;
|
||||
typedef typename Regex::size_type size_type;
|
||||
//typedef typename Regex::size_type size_type;
|
||||
typedef typename Regex::flag_type flag_type;
|
||||
typedef typename Regex::locale_type locale_type;
|
||||
|
||||
@ -806,6 +804,8 @@ struct BoostRegexConcept
|
||||
ignore_unused_variable_warning(i2);
|
||||
bool b = ce == ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce.empty();
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce != ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce < ce2;
|
||||
|
@ -119,7 +119,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k,
|
||||
//
|
||||
// Add it to the list, and index it:
|
||||
//
|
||||
s_data.cont.push_back(value_type(result, 0));
|
||||
s_data.cont.push_back(value_type(result, static_cast<Key const*>(0)));
|
||||
s_data.index.insert(std::make_pair(k, --(s_data.cont.end())));
|
||||
s_data.cont.back().second = &(s_data.index.find(k)->first);
|
||||
map_size_type s = s_data.index.size();
|
||||
|
@ -68,6 +68,7 @@ Accepts UTF-32 code points and forwards them on as UTF-16 code points.
|
||||
#include <stdexcept>
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
#include <sstream>
|
||||
#include <ios>
|
||||
#endif
|
||||
#include <limits.h> // CHAR_BIT
|
||||
|
||||
|
@ -1270,6 +1270,19 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
|
||||
state = state->next.p;
|
||||
continue;
|
||||
}
|
||||
if((static_cast<re_brace*>(state)->index == -1)
|
||||
|| (static_cast<re_brace*>(state)->index == -2))
|
||||
{
|
||||
// skip past the zero width assertion:
|
||||
state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
|
||||
continue;
|
||||
}
|
||||
if(static_cast<re_brace*>(state)->index == -3)
|
||||
{
|
||||
// Have to skip the leading jump state:
|
||||
state = state->next.p->next.p;
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
case syntax_element_endmark:
|
||||
case syntax_element_start_line:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user