mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 03:57:27 +02:00
Initial commit of quickbook generated docs.
[SVN r37943]
This commit is contained in:
@ -0,0 +1,83 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Acknowledgements</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="redist.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<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>.
|
||||
</p>
|
||||
<p>
|
||||
I am indebted to <a href="http://www.cs.princeton.edu/~rs/" target="_top">Robert Sedgewick's
|
||||
"Algorithms in C++"</a> for forcing me to think about algorithms
|
||||
and their performance, and to the folks at boost for forcing me to think,
|
||||
period.
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.boost-consulting.com/" target="_top">Eric Niebler</a>, author
|
||||
of Boost.Expressive and the <a href="http://research.microsoft.com/projects/greta" target="_top">GRETA
|
||||
regular expression component</a>, has shared several important ideas,
|
||||
in a series of long discussions.
|
||||
</p>
|
||||
<p>
|
||||
Pete Becker, of <a href="http://www.versatilecoding.com" target="_top">Roundhouse Consulting,
|
||||
Ltd.</a>, has helped enormously with the standardisation proposal language.
|
||||
</p>
|
||||
<p>
|
||||
The following people have all contributed useful comments or fixes: Dave
|
||||
Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian, Jan B<>lsche,
|
||||
Beman Dawes, Paul Baxter, David Bergman, David Dennerline, Edward Diener,
|
||||
Peter Dimov, Robert Dunn, Fabio Forno, Tobias Gabrielsson, Rob Gillen, Marc
|
||||
Gregoire, Chris Hecker, Nick Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy,
|
||||
Jan Hermelink, Max Leung, Wei-hao Lin, Jens Maurer, Richard Peters, Heiko
|
||||
Schmidt, Jason Shirk, Gerald Slacik, Scobie Smith, Mike Smyth, Alexander
|
||||
Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc Recht, Scott VanCamp, Bruno
|
||||
Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward, Lealon Watts, John Wismar,
|
||||
Thomas Witt and Yuval Yosef.
|
||||
</p>
|
||||
<p>
|
||||
If I've missed your name off (I'm sure there are a few, just not who they
|
||||
are...) then please do get in touch.
|
||||
</p>
|
||||
<p>
|
||||
I am also grateful to the manuals supplied with the Henry Spencer, PCRE,
|
||||
Perl and GNU regular expression libraries - wherever possible I have tried
|
||||
to maintain compatibility with these libraries and with the POSIX standard
|
||||
- the code however is entirely my own, including any bugs! I can absolutely
|
||||
guarantee that I will not fix any bugs I don't know about, so if you have
|
||||
any comments or spot any bugs, please get in touch.
|
||||
</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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="redist.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
217
doc/html/boost_regex/background_information/examples.html
Normal file
217
doc/html/boost_regex/background_information/examples.html
Normal file
@ -0,0 +1,217 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Test and Example Programs</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="thread_safety.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="futher.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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><h5>
|
||||
<a name="id657467"></a>
|
||||
<a href="examples.html#boost_regex.background_information.examples.test_programs">Test
|
||||
Programs</a>
|
||||
</h5>
|
||||
<p>
|
||||
<span class="bold"><strong>regress:</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
A regression test application that gives the matching/searching algorithms
|
||||
a full workout. The presence of this program is your guarantee that the 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.
|
||||
</p>
|
||||
<p>
|
||||
Directory: <a href="../../../../test/regress" target="_top">libs/regex/test/regress</a>.
|
||||
</p>
|
||||
<p>
|
||||
Files: See directory.
|
||||
</p>
|
||||
<p>
|
||||
<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"><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"><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"><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><h5>
|
||||
<a name="id657684"></a>
|
||||
<a href="examples.html#boost_regex.background_information.examples.example_programs">Example
|
||||
programs</a>
|
||||
</h5>
|
||||
<p>
|
||||
<span class="bold"><strong>grep</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
A simple grep implementation, run with the -h command line option to find
|
||||
out its usage.
|
||||
</p>
|
||||
<p>
|
||||
Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>timer.exe</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
A simple interactive expression matching application, the results of all
|
||||
matches are timed, allowing the programmer to optimize their regular expressions
|
||||
where performance is critical.
|
||||
</p>
|
||||
<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><h5>
|
||||
<a name="id657767"></a>
|
||||
<a href="examples.html#boost_regex.background_information.examples.code_snippets">Code
|
||||
snippets</a>
|
||||
</h5>
|
||||
<p>
|
||||
The snippets examples contain the code examples used in the documentation:
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/captures_example.cpp" target="_top">captures_example.cpp</a>:
|
||||
Demonstrates the use of captures.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/credit_card_example.cpp" target="_top">credit_card_example.cpp</a>:
|
||||
Credit card number formatting code.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/partial_regex_grep.cpp" target="_top">partial_regex_grep.cpp</a>:
|
||||
Search example using partial matches.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/partial_regex_match.cpp" target="_top">partial_regex_match.cpp</a>:
|
||||
regex_match example using partial matches.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_iterator_example.cpp" target="_top">regex_iterator_example.cpp</a>:
|
||||
Iterating through a series of matches.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_match_example.cpp" target="_top">regex_match_example.cpp</a>:
|
||||
ftp based regex_match example.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_merge_example.cpp" target="_top">regex_merge_example.cpp</a>:
|
||||
regex_merge example: converts a C++ file to syntax highlighted HTML.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_replace_example.cpp" target="_top">regex_replace_example.cpp</a>:
|
||||
regex_replace example: converts a C++ file to syntax highlighted HTML
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_search_example.cpp" target="_top">regex_search_example.cpp</a>:
|
||||
regex_search example: searches a cpp file for class definitions.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_token_iterator_eg_1.cpp" target="_top">regex_token_iterator_eg_1.cpp</a>:
|
||||
split a string into a series of tokens.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_token_iterator_eg_2.cpp" target="_top">regex_token_iterator_eg_2.cpp</a>:
|
||||
enumerate the linked URL's in a HTML file.
|
||||
</p>
|
||||
<p>
|
||||
The following are deprecated:
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_grep_example_1.cpp" target="_top">regex_grep_example_1.cpp</a>:
|
||||
regex_grep example 1: searches a cpp file for class definitions.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_grep_example_2.cpp" target="_top">regex_grep_example_2.cpp</a>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a
|
||||
global callback function.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_grep_example_3.cpp" target="_top">regex_grep_example_3.cpp</a>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a
|
||||
bound member function callback.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_grep_example_4.cpp" target="_top">regex_grep_example_4.cpp</a>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a
|
||||
C++ Builder closure as a callback.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_split_example_1.cpp" target="_top">regex_split_example_1.cpp</a>:
|
||||
regex_split example: split a string into tokens.
|
||||
</p>
|
||||
<p>
|
||||
<a href="../../../../example/snippets/regex_split_example_2.cpp" target="_top">regex_split_example_2.cpp</a>
|
||||
: regex_split example: spit out linked URL'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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="thread_safety.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="futher.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
150
doc/html/boost_regex/background_information/faq.html
Normal file
150
doc/html/boost_regex/background_information/faq.html
Normal file
@ -0,0 +1,150 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>FAQ</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="futher.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="performance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<p>
|
||||
<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"><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+"
|
||||
in your code. Likewise to match a literal backslash you will need to embed
|
||||
"\\" in your code.
|
||||
</p>
|
||||
<p>
|
||||
<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"><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"><strong>Q.</strong></span> Why does using parenthesis in a POSIX
|
||||
regular expression change the result of a match?
|
||||
</p>
|
||||
<p>
|
||||
<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
|
||||
leftmost longest rule for determining what matched. So if there is more than
|
||||
one possible match after considering the whole expression, it looks next
|
||||
at the first sub-expression and then the second sub-expression and so on.
|
||||
So...
|
||||
</p>
|
||||
<p>
|
||||
"(0*)([0-9]*)" against "00123" would produce $1 = "00"
|
||||
$2 = "123"
|
||||
</p>
|
||||
<p>
|
||||
where as
|
||||
</p>
|
||||
<p>
|
||||
"0*([0-9])*" against "00123" would produce $1 = "00123"
|
||||
</p>
|
||||
<p>
|
||||
If you think about it, had $1 only matched the "123", this would
|
||||
be "less good" than the match "00123" which is both further
|
||||
to the left and longer. If you want $1 to match only the "123"
|
||||
part, then you need to use something like:
|
||||
</p>
|
||||
<p>
|
||||
"0*([1-9][0-9]*)"
|
||||
</p>
|
||||
<p>
|
||||
as the expression.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Q.</strong></span> Why don't character ranges work properly
|
||||
(POSIX mode only)?
|
||||
</p>
|
||||
<p>
|
||||
<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",
|
||||
[A-Z] would match the single character 't' for example, which is not what
|
||||
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 <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 <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 <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"><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"><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"><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"><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"><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
|
||||
your compiler supports, run <boost/regex.hpp> through your C++ pre-processor,
|
||||
and search the output file for the function that you are interested in. Note
|
||||
however, that very few current compilers still have problems with these overloaded
|
||||
functions.
|
||||
</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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="futher.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="performance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
71
doc/html/boost_regex/background_information/futher.html
Normal file
71
doc/html/boost_regex/background_information/futher.html
Normal file
@ -0,0 +1,71 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>References and Further Information</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="examples.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<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>.
|
||||
</p>
|
||||
<p>
|
||||
The main book on regular expressions is <a href="http://www.oreilly.com/catalog/regex/" target="_top">Mastering
|
||||
Regular Expressions, published by O'Reilly</a>.
|
||||
</p>
|
||||
<p>
|
||||
Boost.Regex forms the basis for the regular expression chapter of 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>
|
||||
<p>
|
||||
The <a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm" target="_top">Open
|
||||
Unix Specification</a> contains a wealth of useful material, including
|
||||
the POSIX regular expression syntax.
|
||||
</p>
|
||||
<p>
|
||||
The <a href="http://www.cs.ucr.edu/~stelo/pattern.html" target="_top">Pattern Matching
|
||||
Pointers</a> site is a "must visit" resource for anyone interested
|
||||
in pattern matching.
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://glimpse.cs.arizona.edu/" target="_top">Glimpse and Agrep</a>, use
|
||||
a simplified regular expression syntax to achieve faster search times.
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://glimpse.cs.arizona.edu/udi.html" target="_top">Udi Manber</a> and
|
||||
<a href="http://www.dcc.uchile.cl/~rbaeza/" target="_top">Ricardo Baeza-Yates</a>
|
||||
both have a selection of useful pattern matching papers available from their
|
||||
respective web sites.
|
||||
</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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="examples.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
49
doc/html/boost_regex/background_information/headers.html
Normal file
49
doc/html/boost_regex/background_information/headers.html
Normal file
@ -0,0 +1,49 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Headers</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../background_information.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="locale.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<p>
|
||||
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 <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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../background_information.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="locale.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
229
doc/html/boost_regex/background_information/history.html
Normal file
229
doc/html/boost_regex/background_information/history.html
Normal file
@ -0,0 +1,229 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>History</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
|
||||
</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><h5>
|
||||
<a name="id659964"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_34">Boost
|
||||
1.34</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Fix for non-greedy repeats and partial matches not working correctly in
|
||||
some cases.
|
||||
</li>
|
||||
<li>
|
||||
Fix for non-greedy repeats on VC++ not working in some cases (bug report
|
||||
1515830).
|
||||
</li>
|
||||
<li>
|
||||
Changed match_results::position() to return a valid result when *this represents
|
||||
a partial match.
|
||||
</li>
|
||||
<li>
|
||||
Fixed the grep and egrep options so that the newline character gets treated
|
||||
the same as |.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_33_1"></a><h5>
|
||||
<a name="id660017"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_33_1">Boost
|
||||
1.33.1</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Fixed broken makefiles.
|
||||
</li>
|
||||
<li>
|
||||
Fixed configuration setup to allow building with VC7.1 - STLport-4.6.2
|
||||
when using /Zc:wchar_t.
|
||||
</li>
|
||||
<li>
|
||||
Moved declarations class-inline in static_mutex.hpp so that SGI Irix compiler
|
||||
can cope.
|
||||
</li>
|
||||
<li>
|
||||
Added needed standard library #includes to fileiter.hpp, regex_workaround.hpp
|
||||
and cpp_regex_traits.hpp.
|
||||
</li>
|
||||
<li>
|
||||
Fixed a bug where non-greedy repeats could in certain strange curcumstances
|
||||
repeat more times than their maximum value.
|
||||
</li>
|
||||
<li>
|
||||
Fixed the value returned by basic_regex<>::empty() from a default
|
||||
constructed object.
|
||||
</li>
|
||||
<li>
|
||||
Changed the deffinition of regex_error to make it backwards compatible
|
||||
with Boost-1.32.0.
|
||||
</li>
|
||||
<li>
|
||||
Disabled external templates for Intel C++ 8.0 and earlier - otherwise unresolved
|
||||
references can occur.
|
||||
</li>
|
||||
<li>
|
||||
Rewritten extern template code for gcc so that only specific member functions
|
||||
are exported: otherwise strange unresolved references can occur when linking
|
||||
and mixing debug and non-debug code.
|
||||
</li>
|
||||
<li>
|
||||
Initialise all the data members of the unicode_iterators: this keeps gcc
|
||||
from issuing needless warnings.
|
||||
</li>
|
||||
<li>
|
||||
Ported the ICU integration code to VC6 and VC7.
|
||||
</li>
|
||||
<li>
|
||||
Ensured code is STLport debug mode clean.
|
||||
</li>
|
||||
<li>
|
||||
Fixed lookbehind assertions so that fixed length repeats are permitted,
|
||||
and so that regex iteration allows lookbehind to look back before the current
|
||||
search range (into the last match).
|
||||
</li>
|
||||
<li>
|
||||
Fixed strange bug with non-greedy repeats inside forward lookahead assertions.
|
||||
</li>
|
||||
<li>
|
||||
Enabled negated character classes inside character sets.
|
||||
</li>
|
||||
<li>
|
||||
Fixed regression so that [a-z-] is a valid expression again.
|
||||
</li>
|
||||
<li>
|
||||
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><h5>
|
||||
<a name="id660148"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_33_0">Boost
|
||||
1.33.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Completely rewritten expression parsing code, and traits class support;
|
||||
now conforms to the standardization proposal.
|
||||
</li>
|
||||
<li>
|
||||
Breaking Change: The syntax options that can be passed to basic_regex constructors
|
||||
have been rationalized. The default option (perl) now has a value of zero,
|
||||
and it is now clearly documented which options apply to which regular expression
|
||||
syntax styles (perl, POSIX-extended, POSIX-basic etc). Some of the more
|
||||
esoteric options have now been removed, so there is the possibility that
|
||||
existing code may fail to compile: however equivalent functionality should
|
||||
still be available.
|
||||
</li>
|
||||
<li>
|
||||
Breaking Change: POSIX-extended and POSIX-basic regular expressions now
|
||||
enforce the letter of the POSIX standard much more closely than before.
|
||||
</li>
|
||||
<li>
|
||||
Added support for (?imsx-imsx) constructs.
|
||||
</li>
|
||||
<li>
|
||||
Added support for lookbehind expressions (?<=positive-lookbehind) and
|
||||
(?<!negative-lookbehind).
|
||||
</li>
|
||||
<li>
|
||||
Added support for conditional expressions (?(assertion)true-expresion|false-expression).
|
||||
</li>
|
||||
<li>
|
||||
Added MFC/ATL string wrappers.
|
||||
</li>
|
||||
<li>
|
||||
Added Unicode support; based on ICU.
|
||||
</li>
|
||||
<li>
|
||||
Changed newline support to recognise \f as a line separator (all character
|
||||
types), and \x85 as a line separator for wide characters / Unicode only.
|
||||
</li>
|
||||
<li>
|
||||
Added a new format flag format_literal that treats the replace string as
|
||||
a literal, rather than a Perl or Sed style format string.
|
||||
</li>
|
||||
<li>
|
||||
Errors are now reported by throwing exceptions of type regex_error. The
|
||||
types used previously - bad_expression and bad_pattern - are now just typedefs
|
||||
for regex_error. Type regex_error has a couple of new members: code() to
|
||||
report an error code rather than a string, and position() to report where
|
||||
in the expression the error occured.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="boost_regex.background_information.history.boost_1_32_1"></a><h5>
|
||||
<a name="id660257"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_32_1">Boost
|
||||
1.32.1</a>
|
||||
</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><h5>
|
||||
<a name="id660292"></a>
|
||||
<a href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
|
||||
1.31.0</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Completely rewritten pattern matching code - it is now up to 10 times faster
|
||||
than before.
|
||||
</li>
|
||||
<li>
|
||||
Reorganized documentation.
|
||||
</li>
|
||||
<li>
|
||||
Deprecated all interfaces that are not part of the regular expression standardization
|
||||
proposal.
|
||||
</li>
|
||||
<li>
|
||||
Added regex_iterator and regex_token_iterator .
|
||||
</li>
|
||||
<li>
|
||||
Added support for Perl style independent sub-expressions.
|
||||
</li>
|
||||
<li>
|
||||
Added non-member operators to the sub_match class, so that you can compare
|
||||
sub_match's with strings, or add them to a string to produce a new string.
|
||||
</li>
|
||||
<li>
|
||||
Added experimental support for extended capture information.
|
||||
</li>
|
||||
<li>
|
||||
Changed the match flags so that they are a distinct type (not an integer),
|
||||
if you try to pass the match flags as an integer rather than match_flag_type
|
||||
to the regex algorithms then you will now get a compiler error.
|
||||
</li>
|
||||
</ul></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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1788
doc/html/boost_regex/background_information/locale.html
Normal file
1788
doc/html/boost_regex/background_information/locale.html
Normal file
File diff suppressed because it is too large
Load Diff
55
doc/html/boost_regex/background_information/performance.html
Normal file
55
doc/html/boost_regex/background_information/performance.html
Normal file
@ -0,0 +1,55 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Performance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="faq.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="standards.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<p>
|
||||
The performance of Boost.Regex in both recursive and non-recursive modes
|
||||
should be broadly comparable to other regular expression libraries: recursive
|
||||
mode is slightly faster (especially where memory allocation requires thread
|
||||
synchronisation), but not by much. The following pages compare Boost.Regex
|
||||
with various other regular expression libraries for the following compilers:
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<a href="../../../vc71-performance.html" target="_top">Visual Studio.Net 2003 (recursive
|
||||
Boost.Regex implementation)</a>.
|
||||
</li>
|
||||
<li>
|
||||
<a href="../../../gcc-performance.html" target="_top">Gcc 3.2 (cygwin) (non-recursive Boost.Regex
|
||||
implementation)</a>.
|
||||
</li>
|
||||
</ul></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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="faq.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="standards.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
56
doc/html/boost_regex/background_information/redist.html
Normal file
56
doc/html/boost_regex/background_information/redist.html
Normal file
@ -0,0 +1,56 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Redistributables</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="standards.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<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
|
||||
by defining the symbol BOOST_REGEX_DYN_LINK when you compile your code. While
|
||||
these dll's are redistributable, there are no "standard" versions,
|
||||
so when installing on the users PC, you should place these in a directory
|
||||
private to your application, and not in the PC's directory path. Note that
|
||||
if you link to a static version of your run time library, then you will also
|
||||
link to a static version of Boost.Regex and no dll's will need to be distributed.
|
||||
The possible Boost.Regex dll and library names are computed according to
|
||||
the formula given in <a href="../../../../../../more/getting_started.html" target="_top">the
|
||||
getting started guide</a>.
|
||||
</p>
|
||||
<p>
|
||||
Note: you can disable automatic library selection by defining the symbol
|
||||
BOOST_REGEX_NO_LIB when compiling, this is useful if you want to build Boost.Regex
|
||||
yourself in your IDE, or if you need to debug Boost.Regex.
|
||||
</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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="standards.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
558
doc/html/boost_regex/background_information/standards.html
Normal file
558
doc/html/boost_regex/background_information/standards.html
Normal file
@ -0,0 +1,558 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Standards Conformance</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="performance.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="redist.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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><h5>
|
||||
<a name="id658772"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.c__">C++</a>
|
||||
</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><h5>
|
||||
<a name="id658812"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.ecmascript___javascript">ECMAScript
|
||||
/ JavaScript</a>
|
||||
</h5>
|
||||
<p>
|
||||
All of the ECMAScript regular expression syntax features are supported, except
|
||||
that:
|
||||
</p>
|
||||
<p>
|
||||
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><h5>
|
||||
<a name="id658853"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.perl">Perl</a>
|
||||
</h5>
|
||||
<p>
|
||||
Almost all Perl features are supported, except for:
|
||||
</p>
|
||||
<p>
|
||||
(?{code}) Not implementable in a compiled strongly typed language.
|
||||
</p>
|
||||
<p>
|
||||
(??{code}) Not implementable in a compiled strongly typed language.
|
||||
</p>
|
||||
<a name="boost_regex.background_information.standards.posix"></a><h5>
|
||||
<a name="id658894"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.posix">POSIX</a>
|
||||
</h5>
|
||||
<p>
|
||||
All the POSIX basic and extended regular expression features are supported,
|
||||
except that:
|
||||
</p>
|
||||
<p>
|
||||
No character collating names are recognized except those specified in the
|
||||
POSIX standard for the C locale, unless they are explicitly registered with
|
||||
the traits class.
|
||||
</p>
|
||||
<p>
|
||||
Character equivalence classes ( [[=a=]] etc) are probably buggy except on
|
||||
Win32. Implementing this feature requires knowledge of the format of the
|
||||
string sort keys produced by the system; if you need this, and the default
|
||||
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><h5>
|
||||
<a name="id658939"></a>
|
||||
<a href="standards.html#boost_regex.background_information.standards.unicode">Unicode</a>
|
||||
</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>.
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
Item
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
Feature
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
Support
|
||||
</p>
|
||||
</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.1
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Hex Notation
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Yes: use \x{DDDD} to refer to code point UDDDD.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.2
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Character Properties
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
All the names listed under the General Category Property are supported.
|
||||
Script names and Other Names are not currently supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.3
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Subtraction and Intersection
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Indirectly support by forward-lookahead:
|
||||
</p>
|
||||
<p>
|
||||
<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>
|
||||
<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).
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.4
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Simple Word Boundaries
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Conforming: non-spacing marks are included in the set of word characters.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.5
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Caseless Matching
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported, note that at this level, case transformations are 1:1,
|
||||
many to many case folding operations are not supported (for example
|
||||
"<22>" to "SS").
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.6
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Line Boundaries
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported, except that "." matches only one character of
|
||||
"\r\n". Other than that word boundaries match correctly;
|
||||
including not matching in the middle of a "\r\n" sequence.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
1.7
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Code Points
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported: provided you use the u32* algorithms, then UTF-8, UTF-16
|
||||
and UTF-32 are all treated as sequences of 32-bit code points.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
2.1
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Canonical Equivalence
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not supported: it is up to the user of the library to convert all
|
||||
text into the same canonical form as the regular expression.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
2.2
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Default Grapheme Clusters
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
2.3Default Word Boundaries
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not supported.
|
||||
</p>
|
||||
</td>
|
||||
<td class="auto-generated"><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
2.4
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Default Loose Matches
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
2.5
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Named Properties
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported: the expression "[[:name:]]" or \N{name} matches
|
||||
the named character "name".
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
2.6
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Wildcard properties
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.1
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Tailored Punctuation.
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.2
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Tailored Grapheme Clusters
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.3
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Tailored Word Boundaries.
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.4
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Tailored Loose Matches
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Partial support: [[=c=]] matches characters with the same primary
|
||||
equivalence class as "c".
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.5
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Tailored Ranges
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported: [a-b] matches any character that collates in the range
|
||||
a to b, when the expression is constructed with the collate flag
|
||||
set.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.6
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Context Matches
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.7
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Incremental Matches
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Supported: pass the flag <code class="computeroutput"><span class="identifier">match_partial</span></code>
|
||||
to the regex algorithms.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.8
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Unicode Set Sharing
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.9
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Possible Match Sets
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not supported, however this information is used internally to optimise
|
||||
the matching of regular expressions, and return quickly if no match
|
||||
is possible.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.10
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Folded Matching
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Partial Support: It is possible to achieve a similar effect by using
|
||||
a custom regular expression traits class.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
3.11
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Custom Submatch Evaluation
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Not Supported.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="performance.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="redist.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,80 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Thread Safety</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<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="../../../../../../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="../../../../../../more/index.htm">More</a></td>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="locale.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</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>
|
||||
<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 <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"><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"><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"><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"><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
|
||||
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
|
||||
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 <code class="computeroutput"><span class="identifier">set_locale</span></code>
|
||||
from one thread while another uses regular expressions will produce unpredictable
|
||||
results.
|
||||
</p>
|
||||
<p>
|
||||
There is also a requirement that there is only one thread executing prior
|
||||
to the start of main().
|
||||
</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"><small>Copyright <20> 2007 John Maddock</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="locale.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user