3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Search and Replace Format String Syntax
</title>
5 <link rel=
"stylesheet" href=
"../../../../../doc/src/boostbook.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.77.1">
7 <link rel=
"home" href=
"../index.html" title=
"Boost.Regex 5.1.2">
8 <link rel=
"up" href=
"../index.html" title=
"Boost.Regex 5.1.2">
9 <link rel=
"prev" href=
"syntax/leftmost_longest_rule.html" title=
"The Leftmost Longest Rule">
10 <link rel=
"next" href=
"format/sed_format.html" title=
"Sed Format String Syntax">
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=
"syntax/leftmost_longest_rule.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../index.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=
"format/sed_format.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
27 <a name=
"boost_regex.format"></a><a class=
"link" href=
"format.html" title=
"Search and Replace Format String Syntax">Search and Replace Format String Syntax
</a>
28 </h2></div></div></div>
30 <dt><span class=
"section"><a href=
"format/sed_format.html">Sed Format String Syntax
</a></span></dt>
31 <dt><span class=
"section"><a href=
"format/perl_format.html">Perl Format String Syntax
</a></span></dt>
32 <dt><span class=
"section"><a href=
"format/boost_format_syntax.html">Boost-Extended
33 Format String Syntax
</a></span></dt>
36 Format strings are used by the algorithm
<a class=
"link" href=
"ref/regex_replace.html" title=
"regex_replace"><code class=
"computeroutput"><span class=
"identifier">regex_replace
</span></code></a> and by
<a class=
"link" href=
"ref/match_results.html#boost_regex.match_results_format"><code class=
"computeroutput"><span class=
"identifier">match_results
</span><span class=
"special"><>::
</span><span class=
"identifier">format
</span></code></a>, and are used to transform
37 one string into another.
40 There are three kind of format string:
<a class=
"link" href=
"format/sed_format.html" title=
"Sed Format String Syntax">Sed
</a>,
41 <a class=
"link" href=
"format/perl_format.html" title=
"Perl Format String Syntax">Perl
</a> and
<a class=
"link" href=
"format/boost_format_syntax.html" title=
"Boost-Extended Format String Syntax">Boost-Extended
</a>.
44 Alternatively, when the flag
<code class=
"computeroutput"><span class=
"identifier">format_literal
</span></code>
45 is passed to one of these functions, then the format string is treated as a
46 string literal, and is copied unchanged to the output.
49 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
50 <td align=
"left"></td>
51 <td align=
"right"><div class=
"copyright-footer">Copyright
© 1998-
2013 John Maddock
<p>
52 Distributed under the Boost Software License, Version
1.0. (See accompanying
53 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>)
58 <div class=
"spirit-nav">
59 <a accesskey=
"p" href=
"syntax/leftmost_longest_rule.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../index.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=
"format/sed_format.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>