System.RegularExpressions.TRegEx.Replace
Delphi
function Replace(const Input, Replacement: string): string; overload;
function Replace(const Input: string; Evaluator: TMatchEvaluator): string; overload;
function Replace(const Input, Replacement: string; Count: Integer): string; overload;
function Replace(const Input: string; Evaluator: TMatchEvaluator; Count: Integer): string; overload;
class function Replace(const Input, Pattern, Replacement: string): string; overload; static;
class function Replace(const Input, Pattern: string; Evaluator: TMatchEvaluator): string; overload; static;
class function Replace(const Input, Pattern, Replacement: string; Options: TRegExOptions): string; overload; static;
class function Replace(const Input, Pattern: string; Evaluator: TMatchEvaluator; Options: TRegExOptions): string; overload; static;
C++
System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Replacement)/* overload */;
System::UnicodeString __fastcall Replace(const System::UnicodeString Input, TMatchEvaluator Evaluator)/* overload */;
System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Replacement, int Count)/* overload */;
System::UnicodeString __fastcall Replace(const System::UnicodeString Input, TMatchEvaluator Evaluator, int Count)/* overload */;
static System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Pattern, const System::UnicodeString Replacement)/* overload */;
static System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Pattern, TMatchEvaluator Evaluator)/* overload */;
static System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Pattern, const System::UnicodeString Replacement, TRegExOptions Options)/* overload */;
static System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Pattern, TMatchEvaluator Evaluator, TRegExOptions Options)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.RegularExpressions.pas System.RegularExpressions.hpp |
System.RegularExpressions | TRegEx |
Description
Replace all matches in an Input string with a Replacement string.
Match all occurrences of a regular expression with the specified Replacement string or the return from the Evaluator delegate.
If Pattern is present, use it as the regular expression. Otherwise, use the regular expressions specified in the TRegEx constructor.
Count specifies a maximum number of replacements to perform.
Options effects the matching operation.
See Also
Code Examples