nthword(
TEXT
,
NUMBER
)

The nthword( function extracts a word from the middle of the text.


Parameters

This function has two parameters:

text – original text.

number – position of the word to extract (1 for first word, 2 for second word, etc.) You can also use a negative number to specify the position from the end of the text (-1 for last word, -2 for second to last, etc.)


Description

This function extracts the nth word from the text. For example nthword(text,4) extracts the fourth word.

nthword("now is the time",1) ☞ now
nthword("now is the time",2) ☞ is
nthword("now is the time",4) ☞ time
nthword("now is the time",-1) ☞ time
nthword("now is the time",-2) ☞ the

Note: This function is equivalent to:

array(thetext,thenum," ")

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now allows negative position values to specify the word position from the end of the text.