CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   ASP.NET (http://www.codingforums.com/forumdisplay.php?f=40)
-   -   VB.net Vowels (http://www.codingforums.com/showthread.php?t=254952)

hans_cellc 03-23-2012 01:24 PM

VB.net Vowels
 
I am playing with VB .net and want to write a small prog that will take a string and remove the vowels and place them in the order they were removed into a label.

Removing the vowel was easy with the MID but how do I store them in a variable to be used later.

This what I am trying with no success so far, PLEAZE HELP.

hans_cellc 03-23-2012 01:56 PM

Meaning?

SouthwaterDave 03-24-2012 04:46 PM

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


ben.allen8 10-11-2012 09:41 AM

Looking at the above code, you could make it a bit better by using sub routines and then it will be easier to do separate things in the program good luck :)


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.