Beispiel #1
0
        public static string GetPropertyHome(string value)
        {
            var homePattern = @"д((\.)|(ом))\s?\d+";
            var flatPattern = @"кв((\.)|(артира))\s?\d+";

            var fullPattern = new Regex(homePattern + @"(\,\s?" + flatPattern + @")?(\.)?");

            return(ConsoleCheck <string> .CheckProperty(value, fullPattern, CheckByPattern));
        }
Beispiel #2
0
        public static string GetPropertyStreet(string value)
        {
            var streetPattern = new Regex(@"ул((\.\s?)|(ица\s))[А-Я][а-я]*(\.)?");

            return(ConsoleCheck <string> .CheckProperty(value, streetPattern, CheckByPattern));
        }
Beispiel #3
0
        public static string GetPropertyPhoneNumber(string value)
        {
            var phonePattern = new Regex(@"(\+38)?0((\(\d{2}\))|(\d{2}))\s?\d{3}\s?\d{2}\s?\d{2}");

            return(ConsoleCheck <string> .CheckProperty(value, phonePattern, CheckByPattern));
        }
Beispiel #4
0
 public static decimal GetPropertyDecimal(string value)
 {
     return(ConsoleCheck <decimal> .CheckProperty(value, decimal.Parse));
 }
Beispiel #5
0
 public static float GetPropertyFloat(string value)
 {
     return(ConsoleCheck <float> .CheckProperty(value, float.Parse));
 }
Beispiel #6
0
 public static int GetPropertyInt(string value)
 {
     return(ConsoleCheck <int> .CheckProperty(value, int.Parse));
 }