CSharp · Console
using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
{
string playerName = "spammer.COM";
string replaceString = " ";
Regex regex = new Regex(".com", RegexOptions.IgnoreCase);
playerName = regex.Replace(playerName, replaceString);
Console.WriteLine(playerName);
}
}