using System;
using System.Text;
using System.Text.RegularExpressions;
namespace parsingxml
{
class Program
{
static void Main(string[] args)
{
Console.Write("Give me a mac address: ");
string input = Console.ReadLine();
input = input.Replace(" ", "").Replace(":","").Replace("-","");
Regex r = new Regex("^[a-fA-F0-9]{12}$");
if (r.IsMatch(input))
{
Console.Write("Valid Mac");
}
else
{
Console.Write("Invalid Mac");
}
Console.Read();
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dDsKdXNpbmcgU3lzdGVtLlRleHQuUmVndWxhckV4cHJlc3Npb25zOwoKbmFtZXNwYWNlIHBhcnNpbmd4bWwKewogICAgY2xhc3MgUHJvZ3JhbQogICAgewogICAgICAgIHN0YXRpYyB2b2lkIE1haW4oc3RyaW5nW10gYXJncykKICAgICAgICB7CiAgICAgICAgICAgIENvbnNvbGUuV3JpdGUoIkdpdmUgbWUgYSBtYWMgYWRkcmVzczogIik7CgogICAgICAgICAgICBzdHJpbmcgaW5wdXQgPSBDb25zb2xlLlJlYWRMaW5lKCk7CiAgICAgICAgICAgIGlucHV0ID0gaW5wdXQuUmVwbGFjZSgiICIsICIiKS5SZXBsYWNlKCI6IiwiIikuUmVwbGFjZSgiLSIsIiIpOwoKICAgICAgICAgICAgUmVnZXggciA9IG5ldyBSZWdleCgiXlthLWZBLUYwLTldezEyfSQiKTsKCgogICAgICAgICAgICBpZiAoci5Jc01hdGNoKGlucHV0KSkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgQ29uc29sZS5Xcml0ZSgiVmFsaWQgTWFjIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBDb25zb2xlLldyaXRlKCJJbnZhbGlkIE1hYyIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIENvbnNvbGUuUmVhZCgpOwogICAgICAgIH0KICAgIH0KfQ==