1[/ 2 Copyright 2006-2007 John Maddock. 3 Distributed under the Boost Software License, Version 1.0. 4 (See accompanying file LICENSE_1_0.txt or copy at 5 http://www.boost.org/LICENSE_1_0.txt). 6] 7 8 9[section:sed_format Sed Format String Syntax] 10 11Sed-style format strings treat all characters as literals except: 12 13[table 14[[character][description]] 15[[&][The ampersand character is replaced in the output stream by 16 the whole of what matched the regular expression. Use 17 \\& to output a literal '&' character.]] 18[[\\][Specifies an escape sequence.]] 19] 20 21An escape character followed by any character x, outputs that character unless x 22is one of the escape sequences shown below. 23 24[table 25[[Escape][Meaning]] 26[[\\a][Outputs the bell character: '\\a'.]] 27[[\\e][Outputs the ANSI escape character (code point 27).]] 28[[\\f][Outputs a form feed character: '\\f']] 29[[\\n][Outputs a newline character: '\\n'.]] 30[[\\r][Outputs a carriage return character: '\\r'.]] 31[[\\t][Outputs a tab character: '\\t'.]] 32[[\\v][Outputs a vertical tab character: '\\v'.]] 33[[\\xDD][Outputs the character whose hexadecimal code point is 0xDD]] 34[[\\x{DDDD}][Outputs the character whose hexadecimal code point is 0xDDDDD]] 35[[\\cX][Outputs the ANSI escape sequence "escape-X".]] 36[[\\D][If D is a decimal digit in the range 1-9, then outputs the text that matched sub-expression D.]] 37] 38 39[endsect] 40 41 42