substringBeforeLast

Description: Returns a portion of the Subject, starting with the first character of the Subject and ending with the character immediately before the last occurrence of the argument. If the argument is not present in the Subject, the entire Subject will be returned.

Subject Type: String

Arguments:

  • value : The String to search for in the Subject

Return Type: String

Examples: If the "filename" attribute has the value "a brand new filename.txt", then the following Expressions will result in the following values:

Expression

Value

${filename:substringBeforeLast('.')}

a brand new filename

${filename:substringBeforeLast(' ')}

a brand new

${filename:substringBeforeLast(' n')}

a brand

${filename:substringBeforeLast('missing')}

a brand new filename.txt