Expression Language
Also available as:
PDF

substringAfterLast

Description: Returns a portion of the Subject, starting with the character immediately after the last occurrence of the argument and extending to the end of the Subject. 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:

Table 1.6. Table 6. SubstringAfterLast Examples

Expression

Value

${filename:substringAfterLast('.')}

txt

${filename:substringAfterLast('')}

filename.txt

${filename:substringAfterLast(' n')}

ew filename.txt

${filename:substringAfterLast('missing')}

a brand new filename.txt