i want to validate the input of a text box so as not be empty and also to accept only decimal or integer.
I have tried the following regex’s:
^\S[0-9],?[0-9]$ this one allows one letter at the beginning
^\S[0-9]+,?[0-9]*$ this one althought that does not allow letters, it requires for at least 2 numbers which is not desired.
thank you very much in advance for your time.
Starts with a digit, then possibly . more digits. If you’d like negative numbers
Although easier and more useful might be Double.TryParse.