Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

Text.FindBetween

Searches text for text between the two search strings.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Text 3.0 Yes Yes Yes Yes Yes

MBS( "Text.FindBetween"; Text; SearchText1; SearchText2 { ; IgnoreCase; NthItem } )

(old name: String.FindBetween)

Parameters

Parameter Description Example value
Text The text to search inside. "<x>Hello</x>"
SearchText1 The first search text. "<x>"
SearchText2 The second search text. "</x>"
IgnoreCase Optional
Optional, whether to ignore case in search. Default is 0 for case sensitive search.
0
NthItem Optional
How many items to ignore before doing real search. Pass 1 to get second item.
0

Result

Returns found text.

Description

Searches text for text between the two search strings.
This function is useful for quickly scanning XML documents.

For more complex XML queries, please use XML.Query function.

Examples

Find CountryCode value in some XML:

MBS("Text.FindBetween"; $result; "<v6:CountryCode>"; "</v6:CountryCode>")

Find second value tag text:

MBS("Text.FindBetween"; $result; "<v6:Value>"; "</v6:Value>";0; 1)

Find second item:

MBS("Text.FindBetween"; "<1><2><3>"; "<"; ">"; 0; 1)

Example result: 2

See also


Text.FileExtensionToMimeType   -   Text.InvalidCharactersForEncoding

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins