void mobile_KeyUp(object sender, KeyEventArgs e)
{
Regex rg = new Regex("^[0-9]{1,11}$");
Regex rg1 = new Regex("\b");
if (!rg.IsMatch(mobile.Text) && !rg1.IsMatch(e.Key.ToString()))
{
if (mobile.Text.Length > )
{
mobile.Text = mobile.Text.Substring(, mobile.Text.Length - );
mobile.SelectionStart = mobile.Text.Length;
}
else
{
mobile.Text = "";
}
}
}