I am wondering, how would regular expression for testing correct format of number for German culture would look like.
In German, comma is used as decimal mark and dot is used to separate thousands.
Therefore:
- 1.000 equals to 1000
- 1,000 equals to 1
- 1.000,89 equals to 1000.89
- 1.000.123.456,89 equals to 1000123456.89
The real trick, seems to me, is to make sure, that there could be several dots, optionally followed by comma separator
See Question&Answers more detail:os