using System.Text.RegularExpressions;
using System;
public class Test
{
public static void Main()
{
String s = "0787654321";
if (!Regex.IsMatch(s, @"^078\d{7}")) {
Console.WriteLine("Error! Wrong format.");
}
else {
Console.WriteLine("Correct format.");
}
}
}
dXNpbmcgU3lzdGVtLlRleHQuUmVndWxhckV4cHJlc3Npb25zOwp1c2luZyBTeXN0ZW07CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJU3RyaW5nIHMgPSAiMDc4NzY1NDMyMSI7CiAgICAgICBpZiAoIVJlZ2V4LklzTWF0Y2gocywgQCJeMDc4XGR7N30iKSkgewogICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoIkVycm9yISBXcm9uZyBmb3JtYXQuIik7Cn0KICAgICAgZWxzZSB7CiAgICAgIENvbnNvbGUuV3JpdGVMaW5lKCJDb3JyZWN0IGZvcm1hdC4iKTsKICAgICAgfQogICAgICB9CgkKfQ==