Advertisement
WindFell

CensorShip

May 28th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. class Censorship
  5. {
  6.     static void Main(string[] args)
  7.     {
  8.         string bannedWord = Console.ReadLine();
  9.         string text = Regex.Replace(Console.ReadLine(), bannedWord, new string('*', bannedWord.Length));
  10.  
  11.         Console.WriteLine(text);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement