System.RegularExpressions.TRegEx.Escape

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function Escape(const Str: string; UseWildCards: Boolean = False): string; static;

C++

static System::UnicodeString __fastcall Escape(const System::UnicodeString Str, bool UseWildCards = false);

Properties

Type Visibility Source Unit Parent
function public
System.RegularExpressions.pas
System.RegularExpressions.hpp
System.RegularExpressions TRegEx

Description

Replaces some special characters with their escape codes.

Returns a string of characters with the special characters in Str replaced with their escape codes.

The following special characters are considered:

'\', '[', ']', '^', '$', '.', '|', '?', '*', '+', '(', ')', '{', '}'

If UseWildCards is True, don't convert '\*' or '\?'.