TPerlRegExComputeReplacement (Delphi)
Description
This example uses the TPerlRegEx ComputeReplacement method. This example will show a messagebox saying "Foo is the name of the bar I like".
Code
with PerlRegEx1 do begin
Subject := 'I like to hang out at Foo bar';
RegEx := '([A-Za-z]+) bar';
Replacement := '\1 is the name of the bar I like';
if Match then ShowMessage(RegEx.ComputeReplacement);
end;