Both sides previous revisionPrevious revisionNext revision | Previous revision |
syntax:functions:keepbetween [2021/08/02 02:06] – craigt | syntax:functions:keepbetween [2021/08/14 22:11] (current) – [Examples] craigt |
---|
| |
//text//, //keep_start//, and //keep_end// are implicitly converted to text values if required. | //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===== | =====Examples===== |
keepbetween('http://easymorph.com', 'http://', '.com' ) = 'easymorph' | keepbetween('http://easymorph.com', 'http://', '.com' ) //Returns 'easymorph' |
keepbetween('192.168.0.1 "GET /download.html HTTP/1.1"', '/', ' ') = download.html | |
keepbetween('Mary Joe Smith', 'Mary ', ' Smith') = 'Joe' | keepbetween('192.168.0.1 "GET /download.html HTTP/1.1"', '/', ' ') //Returns download.html |
| |
| keepbetween('Mary Joe Smith', 'Mary ', ' Smith') //Returns 'Joe' |
| |
| keepbetween('Mary Joe Smith', 'Mark ', ' Smith') //Returns 'Mary Joe' ('Mark' not found) |
| |
| keepbetween('Mary Joe Smith', 'Mary ', ' Jones') //Returns 'Joe Smith' ('Jones' not found) |
| |
| keepbetween('Mary Joe Smith', 'Mark ', ' Jones') //Returns (empty) (Neither 'Mark' nor 'Jones' are found) |
| |
| |
\\ | \\ |