Thread: VB.net Vowels
View Single Post
Old 03-24-2012, 04:46 PM   PM User | #3
SouthwaterDave
Regular Coder

 
Join Date: May 2007
Location: UK
Posts: 180
Thanks: 0
Thanked 18 Times in 18 Posts
SouthwaterDave is on a distinguished road
Here's one way, using regular expressions...
Code:

Imports System.Text.RegularExpressions
 
Module Module1
      Sub Main()
             Dim source As String = "Hello", target As String = ""
 
             For Each m As Match In Regex.Matches(source, "[aeiou]")
                    target &= m.Value
             Next
 
             Console.WriteLine(target)
      End Sub
End Module
SouthwaterDave is offline   Reply With Quote