Although not directly related to vb.net, I couldn't find a better home for this question.

I am doing on my form some input validation, and trying to come up with a regular expression that will allow me to input positive decimals with both , and . as delimiter, no matter which is the current locale. Everything is working "almost perfectly.

This is the reg exp I am using: ^[0-9.,\-]+$

It works okay with one problem. It allows me to input multiple dots and commas. For example 2,.,.,.,.4 it allows.

How can I write this regexp so it only allow ONE , or . after the first number?


best regards
H