Guest User

Untitled

a guest
Jun 4th, 2016
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5.  
  6. class Program
  7. {
  8.     static void Main()
  9.     {
  10.         string s = Console.ReadLine();
  11.         string result = Regex.Replace(s, @"\<upcase\>(.*?)\</upcase\>",
  12.             m => {var replaced = m.Groups[1].Value; return replaced.ToUpper();});
  13.         Console.WriteLine(result);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment