uses System.SysUtils,
System.RegularExpressions;
var
Match: TMatch;
PiValue: Double;
begin
Match := TRegEx.Match(
'Pi is equal to 3.14', '\d+\.\d+');
if Match.Success then
begin
PiValue := StrToFloat(Match.Value,
TFormatSettings.Invariant);
//piValue is 3.14
WriteLn('pi is ', PiValue:0:2);
end;
end.