regex fix
This commit is contained in:
parent
d36811c20c
commit
7b61b62fdb
@ -2,7 +2,7 @@ function g_num_valid_number {
|
||||
local f_num
|
||||
for f_num in $@
|
||||
do
|
||||
if ! [[ ${f_num} =~ ^(-\.)?[0-9]+(\.[0-9]+)?$ ]]
|
||||
if ! [[ ${f_num} =~ ^(-)?(\.)?[0-9]+(\.[0-9]+)?$ ]]
|
||||
then
|
||||
g_echo "\"${f_num}\": Not a valid number"
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user