Tinderbox v9 Icon


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]




The .following( ) operator extracts information from one or more paragraphs of a string using a literal quoted string as the match (i.e. no regex support). If match appears in a line, then whatever follows after the match is the result. If match appears in more than one line, the return value is a list of results.

For example, if the text of a note is:

	From: Mark
	To: Clotilde
	Subject: Mignardise


$MyString = $Text.following("To:"); 

would return "Clotilde".

$MyString = $Text.following(":"); 

would return "Mark;Clotilde:Mignardise".

In addition, the .following() operator binds any text that precedes the match(ed) string to $0. If the match appears several times, the first prefix is bound to $0, the second to $1, and so forth.

The .following() operator's argument is interpreted as a sequence of characters, not a regular expression. If the flexibility of regular expressions is needed, use .find() instead.

The .following() operator is useful for extracting formal and semi-formal data from free text and simple interchange formats like email and RIS.