Jump to content

strip out vowels


This topic is 6065 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi i would like to strip out the vowels from a string.

Thats fairly easy but to make the resultant string fairly readable I need the first letter of any separate word to keep the vowel.

eg Office: Academic

=

Offc: Acdmc

any ideas? thanks

Link to comment
Share on other sites

You should also pay attention to your profile - I would not suggest a custom function to you, unless you indicated you have Advanced.

BTW, if all the words are in title case as in your example, it's a simple matter of substituting out all lower-case vowels (the Substitute function is case-sensitive).

Link to comment
Share on other sites

Hello !

I like Substitute and I like Evaluate Too...

I try this Calculation

Let ([

listA =

"a|a e|e i|i o|o u|u y|y A|A E|E I|I O|O U|U Y|Y à|à â|â ä|ä ö|ö ô|ô ù|ù ï|ï é|é è|è ê|ê" ; // Charge Letter|LetterSpaceLetter|Letter

Result = "["" &

Substitute ( listA ; [ "|" ; "";"|" ] ; [ " " ; ""] ; ["" ] ) & ""] ;

[ " |" ; " " ] ; [ "-|" ; "-"] ; [" & quote(¶ & "|") & ";" & quote(¶) & "] ; ["|"

& Substitute ( listA ; [ "|" ; "";""/*" ] ; [ " " ; "*/] ; ["|" ] ) & ""*/] ; ["§ " ; ""] )"

];

Evaluate ( "Substitute ( "§ " & stripVowel::txt ; " & Result )

)

"Just for fun too" :)

Agnès

------------------------

[Try to Explain "Result"

Substitute ( listA ; [ "|" ; "";"|" ] ; [ " " ; ""] ; ["" ] ) & ""] ; <- This part substitute a by |a, e by |e ....

[ " |" ; " " ] ; [ "-|" ; "-"] ; [" & quote( & "|") & ";" & quote(¶) & "] ; <- This part for space; "-" or ¶ to preserve the first letter ( to locate space, "-" or ¶ in left of a word )

; ["|" & Substitute ( listA ; [ "|" ; "";""/*" ] ; [ " " ; "*/] ; ["|" ] ) & ""*/] ; <- This part substitute a by nothing, e by nothing ....

["§ " ; <- And this one for the first blank

]

Edited by Guest
.....
Link to comment
Share on other sites

This topic is 6065 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.