Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-23-2012, 01:24 PM   PM User | #1
hans_cellc
New Coder

 
Join Date: Oct 2011
Posts: 92
Thanks: 38
Thanked 0 Times in 0 Posts
hans_cellc is an unknown quantity at this point
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.

Last edited by hans_cellc; 03-23-2012 at 02:12 PM..
hans_cellc is offline   Reply With Quote
Old 03-23-2012, 01:56 PM   PM User | #2
hans_cellc
New Coder

 
Join Date: Oct 2011
Posts: 92
Thanks: 38
Thanked 0 Times in 0 Posts
hans_cellc is an unknown quantity at this point
Meaning?
hans_cellc is offline   Reply With Quote
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
Old 10-11-2012, 09:41 AM   PM User | #4
ben.allen8
New to the CF scene

 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ben.allen8 is an unknown quantity at this point
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
ben.allen8 is offline   Reply With Quote
Reply

Bookmarks

Tags
vb .net vowels

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:18 AM.


Advertisement
Log in to turn off these ads.