I am validating textbox text using regular expression. The format is x.xxxx and currently I am using @"\d{1}.\d{1,4}" but now I want to change the expression to allow x and if they press . then it should validate for \d{1,4}.
I am validating textbox text using regular expression. The format is x.xxxx and currently
Share
In JavaScript you do it with
/^\d(\.\d{1,4})?$/. In C# you do it with@"^\d(\.\d{1,4})?$"