How do I create a regular expression that validates if a String is:
- a number
- [optional]
,
decimal point - [required if you eat] another number
Also:
- It does NOT have a dot
.
as a symbol for thousands.
I have tried to create it:
[0-9,]+[^.]
But the results:
22,33 CORRECTO
33.44 INCORRECTO
22,33... CORRECTO // PERO DEBERIA SER INCORRECTO!!!
232.33dfdfd CORRECTO // PERO DEBERIA SER INCORRECTO!!!
Expected results:
22,33 CORRECTO
225,3432 CORRECTO
33.44 INCORRECTO
22,33... INCORRECTO
23, INCORRECTO