I need to convert the first letter of each word that the user types in uppercase. I don’t think I am doing it right, so it won’t work, but I’m not sure where it went wrong. D: Thanks for your help! ^^
static void Main(string[] args)
{
Console.Write("Enter anything: ");
string x = Console.ReadLine();
string pattern = "^";
Regex expression = new Regex(pattern);
var regexp = new System.Text.RegularExpressions.Regex(pattern);
Match result = expression.Match(x);
Console.WriteLine(x);
foreach(var match in x)
{
Console.Write(match);
}
Console.WriteLine();
}
user4840466
source
share