mirror of
https://github.com/boostorg/regex.git
synced 2025-07-14 21:06:38 +02:00
Merged typo fixes from trunk.
[SVN r42026]
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
<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>
|
||||
@ -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,16 +1,13 @@
|
||||
<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>
|
||||
@ -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="id647187"></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
|
||||
@ -52,7 +49,7 @@
|
||||
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
|
||||
@ -65,7 +62,7 @@
|
||||
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).
|
||||
@ -77,7 +74,7 @@
|
||||
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).
|
||||
@ -89,7 +86,7 @@
|
||||
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.
|
||||
@ -100,13 +97,13 @@
|
||||
<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="id647395"></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 +113,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 +123,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="id647476"></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 +208,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,14 +1,13 @@
|
||||
<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>
|
||||
@ -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,15 +1,13 @@
|
||||
<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>
|
||||
@ -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,13 +1,13 @@
|
||||
<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>
|
||||
@ -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,13 +1,12 @@
|
||||
<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>
|
||||
@ -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="id649643"></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="id649694"></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="id649824"></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="id649923"></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="id649957"></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,14 +1,13 @@
|
||||
<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>
|
||||
@ -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="id643689"></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="id643933"></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="id644045"></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="id644505"></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,14 +1,13 @@
|
||||
<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>
|
||||
@ -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,15 +1,13 @@
|
||||
<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>
|
||||
@ -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,14 +1,13 @@
|
||||
<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>
|
||||
@ -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="id648468"></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="id648507"></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="id648546"></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="id648584"></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="id648632"></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,15 +1,13 @@
|
||||
<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>
|
||||
@ -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">
|
||||
|
Reference in New Issue
Block a user