.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Text.RegularExpressions;

public class Program
{
	public static void Main()
	{
		string input = "This is a test string which could be any text";
		string exclude = "aeiou";
		var stripped = Regex.Replace(input, "[" + exclude +"]", "");
		Console.WriteLine(stripped);
		var cleaned = Regex.Replace(stripped, "[ ]{2,}", " ");
		Console.WriteLine(cleaned);
	}
}
;