extract(
BODY
,
SEPARATOR
,
ITEM
)

The extract( function extracts a single data item from a text array, and can also be used to count the number of items in the array.


Parameters

This function has three parameters:

body – is the item of text that contains the data you want to extract.

separator – is the separator character for this array. This should be a single character.

item – is the number of the data item you want to extract. The first item is item 1, the second is item 2, etc. Using an item number of –1 tells the extract( function to count the number of data items in the array. This is similar to the arraysize( function. In this case the extract( function will return a number, not text.


Description

This function operates in two modes. In the first mode, it extracts a single data item from a text array (see Text Arrays), just like the array( function. In the second mode, it counts the number of items in an array, just like the arraysize( function.

In the first mode, a positive integer is used for the item number.

extract("a/b/c/d","/",2) ☞ b
extract("a/b/c/d","/",4) ☞ d
extract("a/b/c/d","/",7) ☞ 

In the second mode, –1 is used as the item number. This tells the function to count the number of elements in the array.

extract("a/b/c/d","/",-1) ☞ 4

Note: The extract( function is obsolete. When creating new formulas you should use the array( and arraysize( functions instead. The extract( function is still included for compatibility with older versions of Panorama.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0