Checks whether the specified string is in accord with specified regular expression.
function ExecRegExpr(aRegExpr: string; aInputStr: string): boolean;
var phone:='8(495)123-4567'; if ExecRegExpr ('\d{3}-(\d{2}-\d{2}|\d{4})', phone) then Log('The phone number is correct') else Log('The phone number is not correct');