substringBeforeLast

Returns the portion of a String value that occurs before the last occurrence of some other value.

RecordPath

Return value

substringBeforeLast( /name, ' ' )

John

substringBeforeLast( /name, 'o' )

John D

substringBeforeLast( /name, '' )

John Doe

substringBeforeLast( /name, 'xyz' )

John Doe