^([0-9]+)|(\.[0-9]+)(,[0-9]{1,2})$
it should accept numbers such as:
xx.xxx.xxx,xx
xx,x
xxxxxx,xx
but it also accepts
xxxxx.xx,xx
and that's wrong!! and it also accepts more then 2 decimals (like
xxxxx,xxxx) And that's wrong too.
I.m getting totally confused by this. Any ideas?
perl -E "say /^\d{1,3}(\.\d{1,3})*(,\d{1,2})$/?'Ok':'Error' for qw
(123,12 123.123.123,12 12,1 1,1 1234,12);"
Try this one :)
Cya!