• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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">
11</head>
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>
20</tr></table>
21<hr>
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>
24</div>
25<div class="section">
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>
29<h5>
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
32        Programs</a>
33      </h5>
34<p>
35        <span class="bold"><strong>regress:</strong></span>
36      </p>
37<p>
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
42        it.
43      </p>
44<p>
45        Files:
46      </p>
47<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
48<li class="listitem">
49            <a href="../../../../test/regress/main.cpp" target="_top">main.cpp</a>
50          </li>
51<li class="listitem">
52            <a href="../../../../test/regress/basic_tests.cpp" target="_top">basic_tests.cpp</a>
53          </li>
54<li class="listitem">
55            <a href="../../../../test/regress/test_alt.cpp" target="_top">test_alt.cpp</a>
56          </li>
57<li class="listitem">
58            <a href="../../../../test/regress/test_anchors.cpp" target="_top">test_anchors.cpp</a>
59          </li>
60<li class="listitem">
61            <a href="../../../../test/regress/test_asserts.cpp" target="_top">test_asserts.cpp</a>
62          </li>
63<li class="listitem">
64            <a href="../../../../test/regress/test_backrefs.cpp" target="_top">test_backrefs.cpp</a>
65          </li>
66<li class="listitem">
67            <a href="../../../../test/regress/test_deprecated.cpp" target="_top">test_deprecated.cpp</a>
68          </li>
69<li class="listitem">
70            <a href="../../../../test/regress/test_emacs.cpp" target="_top">test_emacs.cpp</a>
71          </li>
72<li class="listitem">
73            <a href="../../../../test/regress/test_escapes.cpp" target="_top">test_escapes.cpp</a>
74          </li>
75<li class="listitem">
76            <a href="../../../../test/regress/test_grep.cpp" target="_top">test_grep.cpp</a>
77          </li>
78<li class="listitem">
79            <a href="../../../../test/regress/test_icu.cpp" target="_top">test_icu.cpp</a>
80          </li>
81<li class="listitem">
82            <a href="../../../../test/regress/test_locale.cpp" target="_top">test_locale.cpp</a>
83          </li>
84<li class="listitem">
85            <a href="../../../../test/regress/test_mfc.cpp" target="_top">test_mfc.cpp</a>
86          </li>
87<li class="listitem">
88            <a href="../../../../test/regress/test_non_greedy_repeats.cpp" target="_top">test_non_greedy_repeats.cpp</a>
89          </li>
90<li class="listitem">
91            <a href="../../../../test/regress/test_operators.cpp" target="_top">test_operators.cpp</a>
92          </li>
93<li class="listitem">
94            <a href="../../../../test/regress/test_overloads.cpp" target="_top">test_overloads.cpp</a>
95          </li>
96<li class="listitem">
97            <a href="../../../../test/regress/test_perl_ex.cpp" target="_top">test_perl_ex.cpp</a>
98          </li>
99<li class="listitem">
100            <a href="../../../../test/regress/test_replace.cpp" target="_top">test_replace.cpp</a>
101          </li>
102<li class="listitem">
103            <a href="../../../../test/regress/test_sets.cpp" target="_top">test_sets.cpp</a>
104          </li>
105<li class="listitem">
106            <a href="../../../../test/regress/test_simple_repeats.cpp" target="_top">test_simple_repeats.cpp</a>
107          </li>
108<li class="listitem">
109            <a href="../../../../test/regress/test_tricky_cases.cpp" target="_top">test_tricky_cases.cpp</a>
110          </li>
111<li class="listitem">
112            <a href="../../../../test/regress/test_unicode.cpp" target="_top">test_unicode.cpp</a>
113          </li>
114</ul></div>
115<p>
116        <span class="bold"><strong>bad_expression_test:</strong></span>
117      </p>
118<p>
119        Verifies that "bad" regular expressions don't cause the matcher
120        to go into infinite loops, but to throw an exception instead.
121      </p>
122<p>
123        Files: <a href="../../../../test/pathology/bad_expression_test.cpp" target="_top">bad_expression_test.cpp</a>.
124      </p>
125<p>
126        <span class="bold"><strong>recursion_test:</strong></span>
127      </p>
128<p>
129        Verifies that the matcher can't overrun the stack (no matter what the expression).
130      </p>
131<p>
132        Files: <a href="../../../../test/pathology/recursion_test.cpp" target="_top">recursion_test.cpp</a>.
133      </p>
134<p>
135        <span class="bold"><strong>concepts:</strong></span>
136      </p>
137<p>
138        Verifies that the library meets all documented concepts (a compile only test).
139      </p>
140<p>
141        Files: <a href="../../../../test/concepts/concept_check.cpp" target="_top">concept_check.cpp</a>.
142      </p>
143<p>
144        <span class="bold"><strong>captures_test:</strong></span>
145      </p>
146<p>
147        Test code for captures.
148      </p>
149<p>
150        Files: <a href="../../../../test/captures/captures_test.cpp" target="_top">captures_test.cpp</a>.
151      </p>
152<h5>
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
155        programs</a>
156      </h5>
157<p>
158        <span class="bold"><strong>grep</strong></span>
159      </p>
160<p>
161        A simple grep implementation, run with the -h command line option to find
162        out its usage.
163      </p>
164<p>
165        Files: <a href="../../../../example/grep/grep.cpp" target="_top">grep.cpp</a>
166      </p>
167<p>
168        <span class="bold"><strong>timer.exe</strong></span>
169      </p>
170<p>
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.
174      </p>
175<p>
176        Files: <a href="../../../../example/timer/regex_timer.cpp" target="_top">regex_timer.cpp</a>.
177      </p>
178<h5>
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
181        snippets</a>
182      </h5>
183<p>
184        The snippets examples contain the code examples used in the documentation:
185      </p>
186<p>
187        <a href="../../../../example/snippets/captures_example.cpp" target="_top">captures_example.cpp</a>:
188        Demonstrates the use of captures.
189      </p>
190<p>
191        <a href="../../../../example/snippets/credit_card_example.cpp" target="_top">credit_card_example.cpp</a>:
192        Credit card number formatting code.
193      </p>
194<p>
195        <a href="../../../../example/snippets/partial_regex_grep.cpp" target="_top">partial_regex_grep.cpp</a>:
196        Search example using partial matches.
197      </p>
198<p>
199        <a href="../../../../example/snippets/partial_regex_match.cpp" target="_top">partial_regex_match.cpp</a>:
200        regex_match example using partial matches.
201      </p>
202<p>
203        <a href="../../../../example/snippets/regex_iterator_example.cpp" target="_top">regex_iterator_example.cpp</a>:
204        Iterating through a series of matches.
205      </p>
206<p>
207        <a href="../../../../example/snippets/regex_match_example.cpp" target="_top">regex_match_example.cpp</a>:
208        ftp based regex_match example.
209      </p>
210<p>
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.
213      </p>
214<p>
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
217      </p>
218<p>
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.
221      </p>
222<p>
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.
225      </p>
226<p>
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.
229      </p>
230<p>
231        The following are deprecated:
232      </p>
233<p>
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.
236      </p>
237<p>
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.
241      </p>
242<p>
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.
246      </p>
247<p>
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.
251      </p>
252<p>
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.
255      </p>
256<p>
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.
259      </p>
260</div>
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>)
266      </p>
267</div></td>
268</tr></table>
269<hr>
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>
272</div>
273</body>
274</html>
275