Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- class Censorship
- {
- static void Main(string[] args)
- {
- string bannedWord = Console.ReadLine();
- string input = Console.ReadLine();
- string replacement = new string('*', bannedWord.Length);
- string result= Regex.Replace(input, bannedWord, replacement);
- Console.WriteLine(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment