3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Perl 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=
"../format.html" title=
"Search and Replace Format String Syntax">
9 <link rel=
"prev" href=
"sed_format.html" title=
"Sed Format String Syntax">
10 <link rel=
"next" href=
"boost_format_syntax.html" title=
"Boost-Extended 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=
"sed_format.html"><img src=
"../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../format.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=
"boost_format_syntax.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.format.perl_format"></a><a class=
"link" href=
"perl_format.html" title=
"Perl Format String Syntax">Perl Format String Syntax
</a>
28 </h3></div></div></div>
30 Perl-style format strings treat all characters as literals except '$' and
31 '\' which start placeholder and escape sequences respectively.
34 Placeholder sequences specify that some part of what matched the regular
35 expression should be sent to output as follows:
37 <div class=
"informaltable"><table class=
"table">
63 Outputs what matched the whole expression.
99 Outputs the text between the end of the last match found (or the
100 start of the text if no previous match was found), and the start
101 of the current match.
137 Outputs all the text following the end of the current match.
173 Outputs what matched the last marked sub-expression in the regular
193 $LAST_SUBMATCH_RESULT
198 Outputs what matched the last sub-expression to be actually matched.
210 As $LAST_SUBMATCH_RESULT
222 Outputs a literal '$'
234 Outputs what matched the n'th sub-expression.
246 Outputs what matched the n'th sub-expression.
258 Outputs whatever matched the sub-expression named
"NAME".
265 Any $-placeholder sequence not listed above, results in '$' being treated
269 An escape character followed by any character x, outputs that character unless
270 x is one of the escape sequences shown below.
272 <div class=
"informaltable"><table class=
"table">
298 Outputs the bell character: '\a'.
310 Outputs the ANSI escape character (code point
27).
322 Outputs a form feed character: '\f'
334 Outputs a newline character: '\n'.
346 Outputs a carriage return character: '\r'.
358 Outputs a tab character: '\t'.
370 Outputs a vertical tab character: '\v'.
382 Outputs the character whose hexadecimal code point is
0xDD
394 Outputs the character whose hexadecimal code point is
0xDDDDD
406 Outputs the ANSI escape sequence
"escape-X".
418 If D is a decimal digit in the range
1-
9, then outputs the text
419 that matched sub-expression D.
431 Causes the next character to be outputted, to be output in lower
444 Causes the next character to be outputted, to be output in upper
457 Causes all subsequent characters to be output in lower case, until
470 Causes all subsequent characters to be output in upper case, until
483 Terminates a \L or \U sequence.
490 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
491 <td align=
"left"></td>
492 <td align=
"right"><div class=
"copyright-footer">Copyright
© 1998-
2013 John Maddock
<p>
493 Distributed under the Boost Software License, Version
1.0. (See accompanying
494 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>)
499 <div class=
"spirit-nav">
500 <a accesskey=
"p" href=
"sed_format.html"><img src=
"../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../format.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=
"boost_format_syntax.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>