@FindFirst
@FINDFIRST finds the first substring of a string that matches the given regular expression.
DTP Type:
@FINDFIRST can be assigned to a DTP of type string, password, member, members, dimension, or dimensions.
Syntax:
@FINDFIRST(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:
[FINDF_PW_T]=@FINDFIRST([PW],[FindF_String_PW],"true")
Where:
-
[FINDF_PW_T]is a DTP of type password that is not a checked prompt. -
[PW]is a promptable DTP of type password. -
[FindF_String_PW]is a promptable DTP string.
Assume that the following values are input:
-
[PW]: " test20pw15test" -
[FindF_String_PW]: "\d\d " (which is the JAVA expression to return any digit followed by a digit) -
Ignorecase: "true"
In this example, [FINDF_PW_T] returns "20".