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
http://www.ralphlearmont.com.au/

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.

 

Comments

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.

Thanks
 

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.