必须接受:
1,111.11 或 1000.00
不应接受:
,111 或 1,11,11 或 1.00.00
目前有这段代码:
if (System.Text.RegularExpressions.Regex.IsMatch(textBox1.Text, "[^0-9]"))
{
MessageBox.Show("Please enter only numbers.");
//textBox1.Text.Remove(textBox1.Text.Length - 1);
textBox1.Text = string.Empty;
}
仅接受数字