uses System.RegularExpressions;
var
B1, B2, B3: Boolean;
begin
B1 := TRegEx.IsMatch('aaab', 'a+b');
//b1 is True
B2 := TRegEx.IsMatch('aaaba', 'a+b');
//b2 is True
B3 := TRegEx.IsMatch('bbba', 'a+b');
//b3 is False
WriteLn('b1 is ', B1);
WriteLn('b2 is ', B2);
WriteLn('b3 is ', B3);
end.