Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- namespace ое_продвинутое
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- Console.WriteLine ("Введите строку из которого нужно удалить элементы которые оканчиваются на * ");
- String s = Console.ReadLine();
- Console.WriteLine ("Введите букву");
- string k = Console.ReadLine ();
- Console.WriteLine ((Regex.Replace(s, @"{0,}"+k, "")).Trim());
- //нужно заменить как-то @"{0,}:"+k чтобы брало все значения оканчивающиеся на k
- Console.ReadKey ();
- }
- }
Add Comment
Please, Sign In to add comment