if (val == null || System.Text.RegularExpressions.Regex.IsMatch(val, @"[0-9]").Equals(false))
{
cancelEvent.Cancel = true;
}
was that it only matches the first character (therefore, "8f" would match true). Every regex tutorial I can find it far too specific ("this is what you do if you want to verify 5 characters that the user inputs").
All I want to do is check the entire user's input and verify each character is a number and include a decimal point. Thoughts?

New Topic/Question
Reply



MultiQuote


|