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 130 views
130 views asked Nov 21, 2022 by avibootz
1 answer 127 views
127 views asked Nov 21, 2022 by avibootz
1 answer 132 views
1 answer 139 views
1 answer 113 views
1 answer 123 views
123 views asked Mar 27, 2022 by avibootz
4 answers 237 views
237 views asked Aug 18, 2019 by avibootz
...