D
Daniel
I would like to get some help on regular expression to validate
decimal numbers. It should also match negative value, empty value.
The expression:
^(\-){0,1}([1-9]{1}[0-9]{0,8}(\,[0-9]{3})*(\.[0-9]{0,8})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,8})?|0(\.[0-9]{0,8})?|(\.[0-9]{1,8})?)$
is doing this job, but matches a single hyphen "-" also.
For example: matches -12.34 but also matches -
I need help to have this expression modified to unmatch single hyphen
sign ("-") as only letter in the input.
Thanks in Advance.
decimal numbers. It should also match negative value, empty value.
The expression:
^(\-){0,1}([1-9]{1}[0-9]{0,8}(\,[0-9]{3})*(\.[0-9]{0,8})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,8})?|0(\.[0-9]{0,8})?|(\.[0-9]{1,8})?)$
is doing this job, but matches a single hyphen "-" also.
For example: matches -12.34 but also matches -
I need help to have this expression modified to unmatch single hyphen
sign ("-") as only letter in the input.
Thanks in Advance.