Brian Dunning's FileMaker Custom Functions

MiddleWordsIncPunct ( text ; startingWord ; numberOfWords )

Returns words including any punctuation and quote characters to the LEFT and RIGHT of those words

  Average rating: 4.7 (29 votes) Log in to vote

Ralph Learmont   Ralph Learmont
Ralph Learmont

Share on Facebook Share on Twitter

  Sample input:
MiddleWordsIncPunct ( "She screamed \"Let me play too!\". But nobody moved." ; 3 ; 4 )
  Sample output:
"Let me play too!".

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Filemaker's 'MiddleWords' function (and its other similar word functions) provide a string of words which contain all punctuation and quote characters within those words, but strip off any that might have existed at the beginning and end of that word string.
If you need to include these surrounding characters, try this function.



comment   comment, VR
Jan 10, 2012
Words are not always separated by spaces.
Darrel   Darrel, Portland
Mar 17, 2014
You just saved me an hour (really 2 if I was to polish it as you did).

Clean and very useful.


Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.