List:General Discussion« Previous MessageNext Message »
From:Reinhardt Christiansen Date:May 31 2007 6:41pm
Subject:Re: Determining number of vowels in a string
View as plain text  
----- Original Message ----- 
From: "Brent Baisley" <brenttech@stripped>
To: <mysql@stripped>
Sent: Thursday, May 31, 2007 1:50 PM
Subject: Determining number of vowels in a string


> I'm trying to do a select that will return the number of vowels/consonants 
> present in a string for each record. I thought a simple grep was the way 
> to go, but it appears the grep functions only tell you if a string is 
> present. I would even settle for a grep replace. Just replace the vowels 
> with nothing and determine how the string length changed.
>
> Any ideas? I'm using v4.1.
>
> I'd rather do it in a sql statement rather than using a scripting 
> language.

Is your text always in English? Recognizing vowels in other languages and 
scripts could be very difficult; for instance, I'm not sure if Japanese even 
has the _concept_ of vowels or consonants. And even in English, "y" is 
sometimes considered a vowel and sometimes a consonant. At least it was when 
I was in primary school way back when.

--
Rhino 

Thread
Determining number of vowels in a stringBrent Baisley31 May
  • Re: Determining number of vowels in a stringBarry Newton31 May
  • Re: Determining number of vowels in a stringBrent Baisley31 May
  • Re: Determining number of vowels in a stringReinhardt Christiansen31 May
  • Re: Determining number of vowels in a stringBrent Baisley1 Jun