Priya M

Priya M

  • NA
  • 42
  • 10.8k

Regular Exp

Feb 18 2016 5:15 AM
hi,
 I want accept decimal no eg1023.56, 59.00,1566.36
decimal point is allow for only one time
 
public static bool validdecimal(string text)
{
Regex regex = new Regex("^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$");////Not work
return !regex.IsMatch(text);
}
 
on call
e.Handled = !ClassValidation.Validdecimal(e.Text); 

Answers (9)