Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Sed Format String Syntax

Sed-style format strings treat all characters as literals except:




The ampersand character is replaced in the output stream by the whole of what matched the regular expression. Use \& to output a literal '&' character.


Specifies an escape sequence.

An escape character followed by any character x, outputs that character unless x is one of the escape sequences shown below.




Outputs the bell character: '\a'.


Outputs the ANSI escape character (code point 27).


Outputs a form feed character: '\f'


Outputs a newline character: '\n'.


Outputs a carriage return character: '\r'.


Outputs a tab character: '\t'.


Outputs a vertical tab character: '\v'.


Outputs the character whose hexadecimal code point is 0xDD


Outputs the character whose hexadecimal code point is 0xDDDDD


Outputs the ANSI escape sequence "escape-X".


If D is a decimal digit in the range 1-9, then outputs the text that matched sub-expression D.