I have an issue regarding the use of the following regular expression:
private Regex _regexDecimals = new Regex(@"[^.,0-9]");
when I use above the result is dat I can use
1 0,5 ,5 1.0
but when I enter .5 it results in an error trying it to convert it to a double.
Now I've made the following regular expression:
private Regex _regexDecimals = new Regex(@"[0-9]+(?:\.[0-9]*)?");
This matches for using the dots, but not for using the comma's. How can I match also using the comma's?