List down a list of the escape characters in C#

CsharpProgrammingServer Side Programming

The following is the list of escape characters in C# −

Escape characterDescriptionPattern
\aMatches a bell character, \u0007.\a
\bIn a character class, matches a backspace, \u0008.[\b]{3,}
\tMatches a tab, \u0009.(\w+)\t
\rMatches a carriage return, \u000D. (\r is not equivalent to the newline character, \n.)\r\n(\w+)
\vMatches a vertical tab, \u000B.[\v]{2,}
\fMatches a form feed, \u000C.[\f]{2,}
\nMatches a new line, \u000A.\r\n(\w+)
\eMatches an escape, \u001B.\e
\nnnUses octal representation to specify a character (nnnconsists of up to three digits).\w\040\w
\x nnUses hexadecimal representation to specify a character (nn consists of exactly two digits).\w\x20\w
\c X\c xMatches the ASCII control character that is specified by X or x, where X or x is the letter of the control character.\cC
\u nnnnMatches a Unicode character by using hexadecimal representation (exactly four digits, as represented by nnnn).\w\u0020\w
\When followed by a character that is not recognized as an escaped character, matches that character.\d+[\+-x\*]\d+\d+[\+-x\*\d+
raja
Published on 13-Aug-2018 11:15:58
Advertisements