@FindLast

@FINDLAST finds the last substring of a string that matches the given regular expression.

DTP Type:

@FINDLAST can be assigned to a DTP of type string, password, member, members, dimension, or dimensions.

Syntax:

@FINDLAST(text,regExpr,IgnoreCase)

Parameters:

Parameter Description
text Design-time prompt, member, function, or typed in text.
regExpr See Java docs for "java.util.regex.Pattern."
IgnoreCase Optional. True or False. If left empty, defaults to True.

Example:

[FINDL_PW_T]= @FINDLAST([PW],[FindL_String_PW],"true")

Where:

  • [FINDL_PW_T] is a DTP of type password that is not a checked prompt.

  • [PW] is a promptable DTP of type password.

  • [FindL_String_PW] is a promptable DTP of type password.

Assume that the following values are input:

  • [PW]: " test20pw15test"

  • [FindL_String_PW]: "\d\d " (which is the JAVA expression to return any digit followed by a digit)

  • Ignorecase: "true"

In this example, [FINDL_PW_T] returns "15".