Unescape Method

Regex.Unescape Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Unescapes any escaped characters in the input string.

Namespace:  System.Text.RegularExpressions
Assembly:  System (in System.dll)

'Declaration
Public Shared Function Unescape ( _
	str As String _
) As String

Parameters

str
Type: System.String
The input string containing the text to convert.

Return Value

Type: System.String
A string of characters with any escaped characters converted to their unescaped form.

ExceptionCondition
ArgumentNullException

str is Nothing.

As an example, Unescape replaces \x61 with a and \n with a new-line character (ASCII 10). Unescape reverses the transformation done by Escape. (Of course, Escape cannot perfectly reverse Unescape because it cannot deduce from an unescaped string which characters may have been previously escaped.)

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft