Exemplo n.º 1
0
        public static IList <string> RegexGo(string regString)
        {
            var            pattern     = "[А-я ]+";
            StringModel    stringModel = new StringModel();
            IList <string> outText     = new List <string>();



            Regex           newReg  = new Regex(pattern);
            MatchCollection matches = newReg.Matches(regString);

            foreach (Match match in matches)
            {
                var replacaSpace = match.Value.Replace(" ", "");

                if (!string.IsNullOrWhiteSpace(match.Value) && replacaSpace.Length > 1)
                {
                    outText.Add(match.Value);
                }
            }

            return(outText);
        }
Exemplo n.º 2
0
        public static IList<string> RegexGo(string regString)
        {
            var pattern = "[А-я ]+";
            StringModel stringModel=new StringModel();
            IList<string> outText=new List<string>();

            Regex newReg = new Regex(pattern);
            MatchCollection matches = newReg.Matches(regString);

            foreach (Match match in matches)
            {
                var replacaSpace = match.Value.Replace(" ","");

                if (!string.IsNullOrWhiteSpace(match.Value)&&replacaSpace.Length>1)
                {
                    outText.Add(match.Value);

                }
            }

            return outText;
        }