Procházet zdrojové kódy

[regexUtils] some fixes

Exilon před 3 roky
rodič
revize
d07404b79f
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      Quick.RegEx.Utils.pas

+ 2 - 2
Quick.RegEx.Utils.pas

@@ -92,12 +92,12 @@ implementation
 
 class function TRegExUtils.IsNumber(const aValue: string): Boolean;
 begin
-  Result := TRegEx.IsMatch(aValue,'^\d*(\.\d+)?$');
+  Result := TRegEx.IsMatch(aValue,'^(-|)\d*(\.\d+)?$');
 end;
 
 class function TRegExUtils.IsFloat(const aValue: string): Boolean;
 begin
-  Result := TRegEx.IsMatch(aValue,'^\d*\.\d+$');
+  Result := TRegEx.IsMatch(aValue,'^(-|)\d*\.\d+$');
 end;
 
 class function TRegExUtils.IsInteger(const aValue: string): Boolean;