How to remove vowels from a string in VB.NET

1 Answer

0 votes
Imports System
Imports System.Text.RegularExpressions

Public Class Program
	Public Shared Function remove_vowels(ByVal str As String) As String
        Return Regex.Replace(str, "[aeiouAEIOU]", "")
    End Function

    Public Shared Sub Main()
        Dim str As String = "C++ C-Sharp PHP Java Python VB.NET Rust"
		
        Console.Write(remove_vowels(str))
    End Sub
End Class



' run
'
' C++ C-Shrp PHP Jv Pythn VB.NT Rst
'

 



answered Nov 21, 2022 by avibootz

Related questions

1 answer 223 views
223 views asked Nov 21, 2022 by avibootz
1 answer 221 views
221 views asked Nov 21, 2022 by avibootz
1 answer 234 views
1 answer 229 views
1 answer 209 views
1 answer 224 views
224 views asked Mar 27, 2022 by avibootz
4 answers 423 views
423 views asked Aug 18, 2019 by avibootz
...