Regex.Unescape(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts any escaped characters in the input string.
public:
static System::String ^ Unescape(System::String ^ str);
public static string Unescape(string str);
static member Unescape : string -> string
Public Shared Function Unescape (str As String) As String
Parameters
- str
- String
The input string containing the text to convert.
Returns
A string of characters with any escaped characters converted to their unescaped form.
Exceptions
str includes an unrecognized escape sequence.
str is null.
Remarks
The Unescape(String) method reverses the transformation performed by the Escape(String) method by removing the escape character ("\") from each escaped character. It also unescapes hexadecimal values in verbatim string literals, converting them to the actual printable characters (for example, \x07 becomes \a).