private authorUniqueIDText_TextChanged ( object sender, EventArgs e ) : void | ||
sender | object | |
e | EventArgs | |
return | void |
private void authorUniqueIDText_TextChanged(object sender, EventArgs e)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(authorUniqueIDText.Text, @"\A\b[0-9a-fA-F:]+\b\Z"))
{
authorUniqueIDText.Text = new string(authorUniqueIDText.Text.Where(c => char.IsNumber(c) || c == ':' || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')).ToArray());
}
}