M
Markus Joschko
Hi all,
I'm not really a pro concerning regular expressions and in the moment I
desperatly try to get a decimal check working.
There is a kind of a textinputfield which should contain a decimal number.
The only restriction is the length of the overall number (excluding
period):
E.g. length=5
888888 invalid
88888 is valid
88.888 is valid
888.88 is valid
8.8888 is valid
8888.8 is valid
And that is the problem for me.
(\\d*(\\.\\d*){0,1}) -> no length check
(\\d*(\\.\\d*){0,1}){0,5}? -> checks how often the group occurs.
But how can I restrict the overall count of digits ( it does not really
matter if the period is excluded but would be fine)?
Greetings,
Markus
I'm not really a pro concerning regular expressions and in the moment I
desperatly try to get a decimal check working.
There is a kind of a textinputfield which should contain a decimal number.
The only restriction is the length of the overall number (excluding
period):
E.g. length=5
888888 invalid
88888 is valid
88.888 is valid
888.88 is valid
8.8888 is valid
8888.8 is valid
And that is the problem for me.
(\\d*(\\.\\d*){0,1}) -> no length check
(\\d*(\\.\\d*){0,1}){0,5}? -> checks how often the group occurs.
But how can I restrict the overall count of digits ( it does not really
matter if the period is excluded but would be fine)?
Greetings,
Markus