I've been trying all sorts of strange combinations but just can't get my head around Regular Expressions, could somebody help me please. In Germany the , is used instead of a . and a . is used instead of a , e.g. Germen= 10.000,00 English= 10,000.00 I don't need a thousand seperator.
Allowed:
- 1
- 1,0
- 1,00
- ,5
- etc...
Not allowed:
- 1.0
- 1,000
- -,5
- abc
- 0,0€
- etc...
Is it possible to change the format with a Regular Expression so if someone were to enter:
2
or 2,0
it would be changed to 2,00
and if someone where to enter ,5
it would be changed to 0,50
?