I have a List and wish to clean it up by removing various characters. I decided to try Lambda and Regex for the first time but have fallen flat on my face.
foreach (var str in listResults)
{
listResults.Select(c => {c = removePunctuation(c); return c;}).ToList();
}
private string removePunctuation(string str)
{
return Regex.Replace(str, @"\t|\n|\r|.|,|:|;|!", " ");
}