This documentation is archived and is not being maintained.

Regex.Unescape Method

Unescapes any escaped characters in the input string.

[Visual Basic]
Public Shared Function Unescape( _
   ByVal str As String _
) As String
[C#]
public static string Unescape(
 string str
);
[C++]
public: static String* Unescape(
 String* str
);
[JScript]
public static function Unescape(
   str : String
) : String;

Parameters

str
The input string containing the text to convert.

Return Value

A string of characters with any escaped characters converted to their unescaped form.

Remarks

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Regex Class | Regex Members | System.Text.RegularExpressions Namespace

Show: