Export (0) Print
Expand All

Regex.Unescape Method

Unescapes any escaped characters in the input string.

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

public static string Unescape(
	string str
)

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 null.

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.)

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft