I wanted to validate a textbox with a number not starting with zero. For this I used Regex as displayed below.
Regex reg = null;
reg = new System.Text.RegularExpressions.Regex("^[1-9]\d*$")
return reg.IsMatch(str);
Cheers
Samitha
No comments:
Post a Comment