Advertisement
myname0

18_5

Dec 11th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 KB | None | 0 0
  1.  class Program
  2.     {
  3.         //static string RandomString(int length)
  4.         //{
  5.         //    const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ;.,/'!?<>{}[]:+-_=АБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ";
  6.         //    var random = new Random();
  7.         //    return new string(Enumerable.Repeat(chars, length)
  8.         //      .Select(s => s[random.Next(s.Length)]).ToArray());
  9.         //}
  10.  
  11.         static string ReplaceEnglishWords(string text)
  12.         {
  13.             string text1 = Regex.Replace(text, "([A-Z]|[a-z])+", "...");
  14.             return text1;
  15.         }
  16.  
  17.         static void Main(string[] args)
  18.         {
  19.             StreamReader fin = new StreamReader("input.txt");
  20.             string text = fin.ReadToEnd();
  21.             fin.Close();
  22.             //string text = RandomString(100);
  23.             string replaceText = ReplaceEnglishWords(text);
  24.             Console.WriteLine(text);
  25.             Console.WriteLine(replaceText);
  26.         }
  27.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement