Write a program to delete all vowels present in a string in c#
This code
using System;
using System.Text.RegularExpressions;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
var s = Console.ReadLine();
var vowelRegex = new Regex(@"[a|e|i|o|u]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
Console.WriteLine(vowelRegex.Replace(s, ""));
}
}
}
Comments
Leave a comment