.NET Framework Remove non alphanumeric characters from string


Example

public string Remove()
{
    string input = "Hello./!";
    
    return Regex.Replace(input, "[^a-zA-Z0-9]", "");
}