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.3">
8 <link rel="up" href="../background_information.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_information.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_information.examples"></a><a class="link" href="examples.html" title="Test and Example Programs">Test and
29 </h3></div></div></div>
31 <a name="boost_regex.background_information.examples.h0"></a>
32 <span class="phrase"><a name="boost_regex.background_information.examples.test_programs"></a></span><a class="link" href="examples.html#boost_regex.background_information.examples.test_programs">Test
36 <span class="bold"><strong>regress:</strong></span>
39 A regression test application that gives the matching/searching algorithms
40 a full workout. The presence of this program is your guarantee that the library
41 will behave as claimed - at least as far as those items tested are concerned
42 - if anyone spots anything that isn't being tested I'd be glad to hear about
48 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
50 <a href="../../../../test/regress/main.cpp" target="_top">main.cpp</a>
53 <a href="../../../../test/regress/basic_tests.cpp" target="_top">basic_tests.cpp</a>
56 <a href="../../../../test/regress/test_alt.cpp" target="_top">test_alt.cpp</a>
59 <a href="../../../../test/regress/test_anchors.cpp" target="_top">test_anchors.cpp</a>
62 <a href="../../../../test/regress/test_asserts.cpp" target="_top">test_asserts.cpp</a>
65 <a href="../../../../test/regress/test_backrefs.cpp" target="_top">test_backrefs.cpp</a>
68 <a href="../../../../test/regress/test_deprecated.cpp" target="_top">test_deprecated.cpp</a>
71 <a href="../../../../test/regress/test_emacs.cpp" target="_top">test_emacs.cpp</a>
74 <a href="../../../../test/regress/test_escapes.cpp" target="_top">test_escapes.cpp</a>
77 <a href="../../../../test/regress/test_grep.cpp" target="_top">test_grep.cpp</a>
80 <a href="../../../../test/regress/test_icu.cpp" target="_top">test_icu.cpp</a>
83 <a href="../../../../test/regress/test_locale.cpp" target="_top">test_locale.cpp</a>
86 <a href="../../../../test/regress/test_mfc.cpp" target="_top">test_mfc.cpp</a>
89 <a href="../../../../test/regress/test_non_greedy_repeats.cpp" target="_top">test_non_greedy_repeats.cpp</a>
92 <a href="../../../../test/regress/test_operators.cpp" target="_top">test_operators.cpp</a>
95 <a href="../../../../test/regress/test_overloads.cpp" target="_top">test_overloads.cpp</a>
98 <a href="../../../../test/regress/test_perl_ex.cpp" target="_top">test_perl_ex.cpp</a>
100 <li class="listitem">
101 <a href="../../../../test/regress/test_replace.cpp" target="_top">test_replace.cpp</a>
103 <li class="listitem">
104 <a href="../../../../test/regress/test_sets.cpp" target="_top">test_sets.cpp</a>
106 <li class="listitem">
107 <a href="../../../../test/regress/test_simple_repeats.cpp" target="_top">test_simple_repeats.cpp</a>
109 <li class="listitem">
110 <a href="../../../../test/regress/test_tricky_cases.cpp" target="_top">test_tricky_cases.cpp</a>
112 <li class="listitem">
113 <a href="../../../../test/regress/test_unicode.cpp" target="_top">test_unicode.cpp</a>
117 <span class="bold"><strong>bad_expression_test:</strong></span>
120 Verifies that "bad" regular expressions don't cause the matcher
121 to go into infinite loops, but to throw an exception instead.
124 Files: <a href="../../../../test/pathology/bad_expression_test.cpp" target="_top">bad_expression_test.cpp</a>.
127 <span class="bold"><strong>recursion_test:</strong></span>
130 Verifies that the matcher can't overrun the stack (no matter what the expression).
133 Files: <a href="../../../../test/pathology/recursion_test.cpp" target="_top">recursion_test.cpp</a>.
136 <span class="bold"><strong>concepts:</strong></span>
139 Verifies that the library meets all documented concepts (a compile only test).
142 Files: <a href="../../../../test/concepts/concept_check.cpp" target="_top">concept_check.cpp</a>.
145 <span class="bold"><strong>captures_test:</strong></span>
148 Test code for captures.
151 Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
154 <a name="boost_regex.background_information.examples.h1"></a>
155 <span class="phrase"><a name="boost_regex.background_information.examples.example_programs"></a></span><a class="link" href="examples.html#boost_regex.background_information.examples.example_programs">Example
159 <span class="bold"><strong>grep</strong></span>
162 A simple grep implementation, run with the -h command line option to find
166 Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a>
169 <span class="bold"><strong>timer.exe</strong></span>
172 A simple interactive expression matching application, the results of all
173 matches are timed, allowing the programmer to optimize their regular expressions
174 where performance is critical.
177 Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
180 <a name="boost_regex.background_information.examples.h2"></a>
181 <span class="phrase"><a name="boost_regex.background_information.examples.code_snippets"></a></span><a class="link" href="examples.html#boost_regex.background_information.examples.code_snippets">Code
185 The snippets examples contain the code examples used in the documentation:
188 <a href="../../../../example/snippets/captures_example.cpp" target="_top">captures_example.cpp</a>:
189 Demonstrates the use of captures.
192 <a href="../../../../example/snippets/credit_card_example.cpp" target="_top">credit_card_example.cpp</a>:
193 Credit card number formatting code.
196 <a href="../../../../example/snippets/partial_regex_grep.cpp" target="_top">partial_regex_grep.cpp</a>:
197 Search example using partial matches.
200 <a href="../../../../example/snippets/partial_regex_match.cpp" target="_top">partial_regex_match.cpp</a>:
201 regex_match example using partial matches.
204 <a href="../../../../example/snippets/regex_iterator_example.cpp" target="_top">regex_iterator_example.cpp</a>:
205 Iterating through a series of matches.
208 <a href="../../../../example/snippets/regex_match_example.cpp" target="_top">regex_match_example.cpp</a>:
209 ftp based regex_match example.
212 <a href="../../../../example/snippets/regex_merge_example.cpp" target="_top">regex_merge_example.cpp</a>:
213 regex_merge example: converts a C++ file to syntax highlighted HTML.
216 <a href="../../../../example/snippets/regex_replace_example.cpp" target="_top">regex_replace_example.cpp</a>:
217 regex_replace example: converts a C++ file to syntax highlighted HTML
220 <a href="../../../../example/snippets/regex_search_example.cpp" target="_top">regex_search_example.cpp</a>:
221 regex_search example: searches a cpp file for class definitions.
224 <a href="../../../../example/snippets/regex_token_iterator_eg_1.cpp" target="_top">regex_token_iterator_eg_1.cpp</a>:
225 split a string into a series of tokens.
228 <a href="../../../../example/snippets/regex_token_iterator_eg_2.cpp" target="_top">regex_token_iterator_eg_2.cpp</a>:
229 enumerate the linked URL's in a HTML file.
232 The following are deprecated:
235 <a href="../../../../example/snippets/regex_grep_example_1.cpp" target="_top">regex_grep_example_1.cpp</a>:
236 regex_grep example 1: searches a cpp file for class definitions.
239 <a href="../../../../example/snippets/regex_grep_example_2.cpp" target="_top">regex_grep_example_2.cpp</a>:
240 regex_grep example 2: searches a cpp file for class definitions, using a
241 global callback function.
244 <a href="../../../../example/snippets/regex_grep_example_3.cpp" target="_top">regex_grep_example_3.cpp</a>:
245 regex_grep example 2: searches a cpp file for class definitions, using a
246 bound member function callback.
249 <a href="../../../../example/snippets/regex_grep_example_4.cpp" target="_top">regex_grep_example_4.cpp</a>:
250 regex_grep example 2: searches a cpp file for class definitions, using a
251 C++ Builder closure as a callback.
254 <a href="../../../../example/snippets/regex_split_example_1.cpp" target="_top">regex_split_example_1.cpp</a>:
255 regex_split example: split a string into tokens.
258 <a href="../../../../example/snippets/regex_split_example_2.cpp" target="_top">regex_split_example_2.cpp</a>
259 : regex_split example: spit out linked URL's.
262 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
263 <td align="left"></td>
264 <td align="right"><div class="copyright-footer">Copyright © 1998-2013 John Maddock<p>
265 Distributed under the Boost Software License, Version 1.0. (See accompanying
266 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>)
271 <div class="spirit-nav">
272 <a accesskey="p" href="thread_safety.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background_information.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>