Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- using System.Linq;
- using System.Globalization;
- using System.Collections.Generic;
- using System.Text;
- public class Example
- {
- public static void Main(string[] args)
- {
- string input = Console.ReadLine();
- string pattern = @"(\d+)([A-Za-z])";
- MatchCollection m = Regex.Matches(input,pattern);
- StringBuilder result = new StringBuilder(input);
- foreach (Match currM in m)
- {
- result.Replace(currM.Groups[1].Value,currM.Groups[2].Value);
- }
- Console.WriteLine(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement