Guest User

Untitled

a guest
Nov 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. namespace ое_продвинутое
  5. {
  6. class MainClass
  7. {
  8. public static void Main (string[] args)
  9. {
  10.  
  11.  
  12. Console.WriteLine ("Введите строку из которого нужно удалить элементы которые оканчиваются на * ");
  13. String s = Console.ReadLine();
  14. Console.WriteLine ("Введите букву");
  15. string k = Console.ReadLine ();
  16. Console.WriteLine ((Regex.Replace(s, @"{0,}"+k, "")).Trim());
  17. //нужно заменить как-то @"{0,}:"+k чтобы брало все значения оканчивающиеся на k
  18.  
  19.  
  20. Console.ReadKey ();
  21.  
  22. }
  23. }
Add Comment
Please, Sign In to add comment