FEEL

substring before

FEEL built-in function · FEEL string functions

substring before(string, match)

Returns everything before the first occurrence of match; the empty string if match does not occur.

Parameters

ParameterTypeDescription
stringstringthe source string
matchstringthe delimiter to search for

Examples

substring before("foobar", "bar")
substring before("foobar", "xyz")
(empty string) Try it ↑

Edge cases and null handling

substring before("a-b-c", "-")

Only the first occurrence counts.

substring before("foobar", "")
(empty string) Try it ↑

Related functions

substring after · split

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).