3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Test and Example Programs</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
8 <link rel="up" href="../background.html" title="Background Information">
9 <link rel="prev" href="thread_safety.html" title="Thread Safety">
10 <link rel="next" href="futher.html" title="References and Further Information">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="thread_safety.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="futher.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_regex.background.examples"></a><a class="link" href="examples.html" title="Test and Example Programs">Test and Example Programs</a>
28 </h3></div></div></div>
30 <a name="boost_regex.background.examples.h0"></a>
31 <span class="phrase"><a name="boost_regex.background.examples.test_programs"></a></span><a class="link" href="examples.html#boost_regex.background.examples.test_programs">Test
35 <span class="bold"><strong>regress:</strong></span>
38 A regression test application that gives the matching/searching algorithms
39 a full workout. The presence of this program is your guarantee that the library
40 will behave as claimed - at least as far as those items tested are concerned
41 - if anyone spots anything that isn't being tested I'd be glad to hear about
47 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
49 <a href="../../../../test/regress/main.cpp" target="_top">main.cpp</a>
52 <a href="../../../../test/regress/basic_tests.cpp" target="_top">basic_tests.cpp</a>
55 <a href="../../../../test/regress/test_alt.cpp" target="_top">test_alt.cpp</a>
58 <a href="../../../../test/regress/test_anchors.cpp" target="_top">test_anchors.cpp</a>
61 <a href="../../../../test/regress/test_asserts.cpp" target="_top">test_asserts.cpp</a>
64 <a href="../../../../test/regress/test_backrefs.cpp" target="_top">test_backrefs.cpp</a>
67 <a href="../../../../test/regress/test_deprecated.cpp" target="_top">test_deprecated.cpp</a>
70 <a href="../../../../test/regress/test_emacs.cpp" target="_top">test_emacs.cpp</a>
73 <a href="../../../../test/regress/test_escapes.cpp" target="_top">test_escapes.cpp</a>
76 <a href="../../../../test/regress/test_grep.cpp" target="_top">test_grep.cpp</a>
79 <a href="../../../../test/regress/test_icu.cpp" target="_top">test_icu.cpp</a>
82 <a href="../../../../test/regress/test_locale.cpp" target="_top">test_locale.cpp</a>
85 <a href="../../../../test/regress/test_mfc.cpp" target="_top">test_mfc.cpp</a>
88 <a href="../../../../test/regress/test_non_greedy_repeats.cpp" target="_top">test_non_greedy_repeats.cpp</a>
91 <a href="../../../../test/regress/test_operators.cpp" target="_top">test_operators.cpp</a>
94 <a href="../../../../test/regress/test_overloads.cpp" target="_top">test_overloads.cpp</a>
97 <a href="../../../../test/regress/test_perl_ex.cpp" target="_top">test_perl_ex.cpp</a>
100 <a href="../../../../test/regress/test_replace.cpp" target="_top">test_replace.cpp</a>
102 <li class="listitem">
103 <a href="../../../../test/regress/test_sets.cpp" target="_top">test_sets.cpp</a>
105 <li class="listitem">
106 <a href="../../../../test/regress/test_simple_repeats.cpp" target="_top">test_simple_repeats.cpp</a>
108 <li class="listitem">
109 <a href="../../../../test/regress/test_tricky_cases.cpp" target="_top">test_tricky_cases.cpp</a>
111 <li class="listitem">
112 <a href="../../../../test/regress/test_unicode.cpp" target="_top">test_unicode.cpp</a>
116 <span class="bold"><strong>bad_expression_test:</strong></span>
119 Verifies that "bad" regular expressions don't cause the matcher
120 to go into infinite loops, but to throw an exception instead.
123 Files: <a href="../../../../test/pathology/bad_expression_test.cpp" target="_top">bad_expression_test.cpp</a>.
126 <span class="bold"><strong>recursion_test:</strong></span>
129 Verifies that the matcher can't overrun the stack (no matter what the expression).
132 Files: <a href="../../../../test/pathology/recursion_test.cpp" target="_top">recursion_test.cpp</a>.
135 <span class="bold"><strong>concepts:</strong></span>
138 Verifies that the library meets all documented concepts (a compile only test).
141 Files: <a href="../../../../test/concepts/concept_check.cpp" target="_top">concept_check.cpp</a>.
144 <span class="bold"><strong>captures_test:</strong></span>
147 Test code for captures.
150 Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
153 <a name="boost_regex.background.examples.h1"></a>
154 <span class="phrase"><a name="boost_regex.background.examples.example_programs"></a></span><a class="link" href="examples.html#boost_regex.background.examples.example_programs">Example
158 <span class="bold"><strong>grep</strong></span>
161 A simple grep implementation, run with the -h command line option to find
165 Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a>
168 <span class="bold"><strong>timer.exe</strong></span>
171 A simple interactive expression matching application, the results of all
172 matches are timed, allowing the programmer to optimize their regular expressions
173 where performance is critical.
176 Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
179 <a name="boost_regex.background.examples.h2"></a>
180 <span class="phrase"><a name="boost_regex.background.examples.code_snippets"></a></span><a class="link" href="examples.html#boost_regex.background.examples.code_snippets">Code
184 The snippets examples contain the code examples used in the documentation:
187 <a href="../../../../example/snippets/captures_example.cpp" target="_top">captures_example.cpp</a>:
188 Demonstrates the use of captures.
191 <a href="../../../../example/snippets/credit_card_example.cpp" target="_top">credit_card_example.cpp</a>:
192 Credit card number formatting code.
195 <a href="../../../../example/snippets/partial_regex_grep.cpp" target="_top">partial_regex_grep.cpp</a>:
196 Search example using partial matches.
199 <a href="../../../../example/snippets/partial_regex_match.cpp" target="_top">partial_regex_match.cpp</a>:
200 regex_match example using partial matches.
203 <a href="../../../../example/snippets/regex_iterator_example.cpp" target="_top">regex_iterator_example.cpp</a>:
204 Iterating through a series of matches.
207 <a href="../../../../example/snippets/regex_match_example.cpp" target="_top">regex_match_example.cpp</a>:
208 ftp based regex_match example.
211 <a href="../../../../example/snippets/regex_merge_example.cpp" target="_top">regex_merge_example.cpp</a>:
212 regex_merge example: converts a C++ file to syntax highlighted HTML.
215 <a href="../../../../example/snippets/regex_replace_example.cpp" target="_top">regex_replace_example.cpp</a>:
216 regex_replace example: converts a C++ file to syntax highlighted HTML
219 <a href="../../../../example/snippets/regex_search_example.cpp" target="_top">regex_search_example.cpp</a>:
220 regex_search example: searches a cpp file for class definitions.
223 <a href="../../../../example/snippets/regex_token_iterator_eg_1.cpp" target="_top">regex_token_iterator_eg_1.cpp</a>:
224 split a string into a series of tokens.
227 <a href="../../../../example/snippets/regex_token_iterator_eg_2.cpp" target="_top">regex_token_iterator_eg_2.cpp</a>:
228 enumerate the linked URL's in a HTML file.
231 The following are deprecated:
234 <a href="../../../../example/snippets/regex_grep_example_1.cpp" target="_top">regex_grep_example_1.cpp</a>:
235 regex_grep example 1: searches a cpp file for class definitions.
238 <a href="../../../../example/snippets/regex_grep_example_2.cpp" target="_top">regex_grep_example_2.cpp</a>:
239 regex_grep example 2: searches a cpp file for class definitions, using a
240 global callback function.
243 <a href="../../../../example/snippets/regex_grep_example_3.cpp" target="_top">regex_grep_example_3.cpp</a>:
244 regex_grep example 2: searches a cpp file for class definitions, using a
245 bound member function callback.
248 <a href="../../../../example/snippets/regex_grep_example_4.cpp" target="_top">regex_grep_example_4.cpp</a>:
249 regex_grep example 2: searches a cpp file for class definitions, using a
250 C++ Builder closure as a callback.
253 <a href="../../../../example/snippets/regex_split_example_1.cpp" target="_top">regex_split_example_1.cpp</a>:
254 regex_split example: split a string into tokens.
257 <a href="../../../../example/snippets/regex_split_example_2.cpp" target="_top">regex_split_example_2.cpp</a>
258 : regex_split example: spit out linked URL's.
261 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
262 <td align="left"></td>
263 <td align="right"><div class="copyright-footer">Copyright © 1998-2013 John Maddock<p>
264 Distributed under the Boost Software License, Version 1.0. (See accompanying
265 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>)
270 <div class="spirit-nav">
271 <a accesskey="p" href="thread_safety.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="futher.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>