Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- namespace ConsoleApp1
- {
- internal class Program
- {
- static void Main()
- {
- string возможныйПаттернИлиЕгоЧасть...
- strint этихСтрокМожетИНеБыть...
- string pattern = @"итоговый регекс из строк выше";
- Regex reg = new Regex(pattern);
- string input = Console.ReadLine();
- while (input != null)
- {
- MatchCollection matches = reg.Matches(input);
- for (int count = 0; count < matches.Count; count++)
- {
- Console.WriteLine(matches[count].Value);
- }
- input = Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement