Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

calc: how many words ?

Featured Replies

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 ?

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 !@#$%$%^*()=≠+/[]{}<>≤≥:P;`~|",? 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.

  • Author

Hi comment

nice to know !

Thank you.

Maybe if you used the Substitute function with the word count you can get what you want.

WordCount (Substitute (Substitute ( Text ; "." ; " " ); "@"; " " ))

HTH

Lee

  • 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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.