Skip to content

Commit d07404b

Browse files
committed
[regexUtils] some fixes
1 parent 9641c14 commit d07404b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Quick.RegEx.Utils.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ implementation
9292

9393
class function TRegExUtils.IsNumber(const aValue: string): Boolean;
9494
begin
95-
Result := TRegEx.IsMatch(aValue,'^\d*(\.\d+)?$');
95+
Result := TRegEx.IsMatch(aValue,'^(-|)\d*(\.\d+)?$');
9696
end;
9797

9898
class function TRegExUtils.IsFloat(const aValue: string): Boolean;
9999
begin
100-
Result := TRegEx.IsMatch(aValue,'^\d*\.\d+$');
100+
Result := TRegEx.IsMatch(aValue,'^(-|)\d*\.\d+$');
101101
end;
102102

103103
class function TRegExUtils.IsInteger(const aValue: string): Boolean;

0 commit comments

Comments
 (0)