c# – How to replace the giveen email address with a value in a given input?

I have written the below method to replace some of the email domains like @gmail.com and @yahoo.com with a given text.

public static string RemovePersonalInfo(string input)
{
    string() tokens = input.Split(new char() { ' ', 't', 'r', 'n' });
    string output = string.Empty;
    foreach (string token in tokens)
    {
        if (token.Contains("@gmail.com"))
        {
            output += " SOMETEXT";
        }
        else
        {
            output += " " + token;
        }
    }
    tokens = output.Split(new char() { ' ', 't', 'r', 'n' });
    output = string.Empty;
    foreach (string token in tokens)
    {
        if (token.Contains("@yahoo.com"))
        {
            output += " SOMETEXT";
        }
        else
        {
            output += " " + token;
        }
    }
    return output;
}

It is working as expected for the below input.

But I don’t think it is a good solution, I can see the improvements in the code like it is not scalable, let’s see tomorrow some other email domain comes, I will have to again modify the code and write another if condition. the second improvement is that I am running the loop twice, it can be done in one loop. so performance can be improved.

Or if there is any better approach than this, please suggest.

input: test@gmail.com test@abc.com @teest@yahoo.com

output: SOMETEXT test@abc.com SOMETEXT

Note: I am not supposed to use the Replace method. So the only intention here is to use the same logic in basic programming languages like C and C++ as well.