November 12, 200718 yr 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
November 13, 200718 yr Sounds like a job for a recursive custom function. It nds t lv th frst lttr of ech wrd bt strp th vwls frm th rst of th wrd.
November 13, 200718 yr This was much harder than it appears to be. Its tricky to keep the punctuation and spacing between the words. Give this a try and see what you think. stripVowel.fp7.zip
November 13, 200718 yr Author Thanks guys - I can see custom functions is something I need to pay some attention to
November 13, 200718 yr Just for fun. A "simple" calculation... but please do not find too many word separators ! (handled blank, CR and dash). A recursive function has its limit for long texts. stripVowel2.fp7.zip Edited November 13, 200718 yr by Guest
November 13, 200718 yr 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).
November 13, 200718 yr 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 November 13, 200718 yr by Guest .....
Create an account or sign in to comment