Valid period format
The current regex (^[0-9]+(\.[0-9]+)
) for detecting valid period formats seems to disallow periods specified without a decimal dot, e.g., PERIODS=(4.0 3.0 2.0 1.0)
is valid, but PERIODS=(4 3 2 1)
is not valid.
Suggested new (PCRE2) Regex (2022-09-27)
(^0$)|(^0\.[0-9]+$)|(^[1-9][0-9]*$)|(^[1-9][0-9]*\.[0-9]+$)
which yields:
OK 4.023412
OK 444.123
NOK 000.123
OK 0.123
OK 0
NOK 0.
OK 0.0
NOK 0123
OK 0.123
OK 342.52
NOK 432.
NOK 013.52
OK 1234
OK 1234.1234