In the following code I want to replace every occurrence of "U.S.A" with "united states of America" and every occurrence of "uk" with "united kingdom" in a string, but it does not seem to work. How do I fix it?
class Program
{
static void Main(string[] args)
{
string s = "the U.S.A love UK";
Console.WriteLine(replace(s));
}
public static string replace(string s)
{
s = Regex.Replace(s, @"^U.S.A", " United state Of America");
s = Regex.Replace(s, @"^Uk", "United kingdom");
return s;
}
}