Add Text, remove vowels

Suppose the user typed a message into an input field. Is there a way for it to feed into a second feild, with Vowels and double letters removed?
I had been provided these code snippets but not sure what to do with it honestly. lol

System.Text.RegularExpressions.Regex.Replace(inputString,"([a-zA-Z])\\1", "$1")
System.Text.RegularExpressions.Regex.Replace(inputString,"[aeiouAEIOU]*", string.Empty)

42855-example.png

You probably want to learn about Regular Expressions.

The .Net Library has a class for handling things like Replacing strings matched with regular expression.

For your cases, I came up with these:

Replace all vowels with empty string:

System.Text.RegularExpressions.Regex.Replace(inputString,"[aeiouAEIOU]*", string.Empty)

Replace double letters with a single version of the letter:

System.Text.RegularExpressions.Regex.Replace(inputString,"([a-zA-Z])\\1", "$1")

Regex is probably a better solution, but if it helps. You can use string’s Replace method:

		string myText = "The quick brown fox jumps over the lazy dog";

		// Make a copy of myText that will have characters replaced
		string trimmed = myText;	

		// Using the String.Replace method 
		trimmed = trimmed.Replace("a", string.Empty);
		trimmed = trimmed.Replace("e", string.Empty);
		trimmed = trimmed.Replace("i", string.Empty);
		trimmed = trimmed.Replace("o", string.Empty);
		trimmed = trimmed.Replace("u", string.Empty);

		// alternatively, you can chain the method
		trimmed = allText.Replace("a", "")
						.Replace("e", "")
						.Replace("i", "")
						.Replace("o", "")
						.Replace("u", "");

        // outputs "Th qck brwn fx jmps vr th lzy dg"
		Debug.Log(trimmed);