Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
You're overwriting the resultresult variable throughout the loop repeatedly, there doesn't seem to be any need for it either, just use the input variable
result
input
input = Regex.Replace(input, pattern[i], replacement); ... Console.WriteLine(input);
You're overwriting the result variable throughout the loop repeatedly, there doesn't seem to be any need for it either, just use the input variable