2007-06-08 09:23:23 +00:00
< html >
< head >
2020-10-12 18:22:57 +01:00
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" >
2007-12-14 10:11:21 +00:00
< title > Search and Replace Format String Syntax</ title >
2010-07-08 22:49:58 +00:00
< link rel = "stylesheet" href = "../../../../../doc/src/boostbook.css" type = "text/css" >
2019-10-26 10:51:25 +01:00
< meta name = "generator" content = "DocBook XSL Stylesheets V1.79.1" >
2022-03-08 11:26:11 +00:00
< link rel = "home" href = "../index.html" title = "Boost.Regex 7.0.1" >
< link rel = "up" href = "../index.html" title = "Boost.Regex 7.0.1" >
2007-12-14 10:11:21 +00:00
< link rel = "prev" href = "syntax/leftmost_longest_rule.html" title = "The Leftmost Longest Rule" >
< link rel = "next" href = "format/sed_format.html" title = "Sed Format String Syntax" >
2024-03-23 19:03:45 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2007-06-08 09:23:23 +00:00
</ head >
< body bgcolor = "white" text = "black" link = "#0000FF" vlink = "#840084" alink = "#0000FF" >
2007-08-13 17:54:01 +00:00
< table cellpadding = "2" width = "100%" >< tr >
2007-06-08 09:23:23 +00:00
< td valign = "top" >< img alt = "Boost C++ Libraries" width = "277" height = "86" src = "../../../../../boost.png" ></ td >
2008-04-11 08:53:54 +00:00
< td align = "center" >< a href = "../../../../../index.html" > Home</ a ></ td >
2007-06-08 09:23:23 +00:00
< td align = "center" >< a href = "../../../../../libs/libraries.htm" > Libraries</ a ></ td >
2008-07-25 09:28:01 +00:00
< td align = "center" >< a href = "http://www.boost.org/users/people.html" > People</ a ></ td >
< td align = "center" >< a href = "http://www.boost.org/users/faq.html" > FAQ</ a ></ td >
2007-06-08 09:23:23 +00:00
< td align = "center" >< a href = "../../../../../more/index.htm" > More</ a ></ td >
2007-08-13 17:54:01 +00:00
</ tr ></ table >
2007-06-08 09:23:23 +00:00
< hr >
< div class = "spirit-nav" >
2010-07-08 22:49:58 +00:00
< 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 >
2007-06-08 09:23:23 +00:00
</ div >
2013-12-14 17:42:13 +00:00
< div class = "section" >
2007-06-08 09:23:23 +00:00
< div class = "titlepage" >< div >< div >< h2 class = "title" style = "clear: both" >
2011-01-01 12:27:00 +00:00
< 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 >
2007-12-14 10:11:21 +00:00
</ h2 ></ div ></ div ></ div >
2019-10-26 10:51:25 +01:00
< div class = "toc" >< dl class = "toc" >
2011-01-01 12:27:00 +00:00
< dt >< span class = "section" >< a href = "format/sed_format.html" > Sed Format String Syntax</ a ></ span ></ dt >
< dt >< span class = "section" >< a href = "format/perl_format.html" > Perl Format String Syntax</ a ></ span ></ dt >
< dt >< span class = "section" >< a href = "format/boost_format_syntax.html" > Boost-Extended
2007-06-08 09:23:23 +00:00
Format String Syntax</ a ></ span ></ dt >
</ dl ></ div >
< p >
2008-12-23 11:46:00 +00:00
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
2007-06-08 09:23:23 +00:00
one string into another.
</ p >
< p >
2008-12-23 11:46:00 +00:00
There are three kind of format string: < a class = "link" href = "format/sed_format.html" title = "Sed Format String Syntax" > Sed</ a > ,
< 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 > .
2007-06-08 09:23:23 +00:00
</ p >
< p >
2007-12-14 10:11:21 +00:00
Alternatively, when the flag < code class = "computeroutput" >< span class = "identifier" > format_literal</ span ></ code >
2007-06-08 09:23:23 +00:00
is passed to one of these functions, then the format string is treated as a
string literal, and is copied unchanged to the output.
</ p >
</ div >
2024-03-23 19:03:45 +00:00
< div class = "copyright-footer" > Copyright © 1998-2013 John Maddock< p >
2007-11-07 03:23:31 +00:00
Distributed under the Boost Software License, Version 1.0. (See accompanying
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 > )
2007-12-14 10:11:21 +00:00
</ p >
2024-03-23 19:03:45 +00:00
</ div >
2007-06-08 09:23:23 +00:00
< hr >
< div class = "spirit-nav" >
2010-07-08 22:49:58 +00:00
< 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 >
2007-06-08 09:23:23 +00:00
</ div >
</ body >
</ html >