Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text.RegularExpressions;
- public class Example
- {
- public static void Main()
- {
- string input = Console.ReadLine();
- string pattern = @"(\w+)-\1";
- var didimon = new List<string>();
- var bojomon = new List<Group>();
- foreach (Match m in Regex.Matches(input, pattern))
- {
- bojomon.Add(m);
- }
- var result = Regex.Split(input, @"(\w+)-\1");
- foreach (var item in result)
- {
- didimon.Add(item);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement