September 9, 200520 yr Hi all friends they (FMI) said: WordCount function Format WordCount(text) Parameter text - any text expression or text field Data type returned number Description Returns a count of the total number of words in text. Examples WordCount("The sun is rising.") returns 4. WordCount(Letter) returns the total number of words in the Letter field. Note The ampersand (&) and hyphen (-) characters identify the beginning of a new word. But this: [email protected] is two words and this: libero.it is one word In the first example, with this calculation: MiddleWords (text ; 1 ; 1 ) & "-" &MiddleWords (text ; 2 ; 1 ) I'll give: raybaudi-libero.it Where is gone the "@" ? ( so I think that there are more then two characters (ampersand (&) and hyphen (-)) that identify the beginning of a word; the only one that doesn't is the period (.)) What do you think about ?
September 9, 200520 yr The ampersand and hyphen are word delimiters - but they are not the only ones. There are many more, first and foremost a space, of course. I don't know if there's a comprehensive list, but at least !@#$%$%^*()=≠+/[]{}<>≤≥;`~|",? are all word delimiters. The period CAN BE a word delimiter - depending on the last character of the preceding string and the first character of the following string: If both characters are numeric, or both are alpha - the two strings are considered to be one word; If one of the characters is alpha and the other is numeric, the period is considered a word delimiter: one.two = 1 word one.2 = 2 words 1.two = 2 words 1.2 = 1 word The single quote character ' also has its own rules: one'two = 1 word one'2 = 2 words 1'two = 2 words 1'2 = 2 words Word delimiters are not words, so you cannot get them with the MiddleWords() function.
September 9, 200520 yr Maybe if you used the Substitute function with the word count you can get what you want. WordCount (Substitute (Substitute ( Text ; "." ; " " ); "@"; " " )) HTH Lee
September 9, 200520 yr Author Hi Lee thank you. But no, I didn't want to really count the words; I only found that what FMI says isn't complete ! The comment's reply is ! BTW that kind of problem come to me when I searched for a manner to grab an email address from a long generic text... I'll open a new topic in Custom Functions about it.
Create an account or sign in to comment