User Tools

Site Tools


syntax:functions:keepbetween

This is an old revision of the document!


KeepBetween(text, keep_start, keep_end)

Category: Text function


Description

This function returns the characters between the first occurrence of keep_start and the first occurrence of keep_end in text.


Arguments

ArgumentTypeDescription
textTextThe text value to search within for the after_string string.
keep_startText (must not be empty)The text string to search for within text defining the starting point of the string to be returned
(not including this string).
keep_endText (must not be empty)The text string to search for within text defining the end point of the string to be returned
(not including this string).

Return value type: Text


Remarks

This function is case sensitive.

text, keep_start, and keep_end are implicitly converted to text values if required.

If keep_start is not found within text, all text from the start of text to keep_end.
If keep_end is not found within text, all text from the keep_start to the end of text is returned.
If neither keep_start nor keep_end are found within text, an (empty) value is returned.


Examples

keepbetween('http://easymorph.com', 'http://', '.com' ) = 'easymorph'
keepbetween('192.168.0.1 "GET /download.html HTTP/1.1"', '/', ' ') = download.html
keepbetween('Mary Joe Smith', 'Mary ', ' Smith') = 'Joe'


See also

syntax/functions/keepbetween.1627884912.txt.gz · Last modified: 2021/08/02 02:15 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki