@Matches

如果字串的第一個子字串符合指定的一般表示式,@MATCHES 會傳回 "true"。

DTP 類型:

可以將 @MATCHES 指派給字串密碼成員多個成員維度多個維度 類型的 DTP。

語法:

@MATCHES(text,regExpr,IgnoreCase)

參數:

參數 描述
text 設計時期提示
regExpr 請參閱有關 "java.util.regex.Pattern" 的 Java 文件
IgnoreCase 選擇性。True 或 False。如果保留空白,預設值為 True。

範例:

[Matches_Mbr]=@MATCHES([Mbr],[Match_String_Mbr],"true")

其中:

  • [Mbr] 是可提示的 DTP 成員類型

  • [Match_String_Mbr] 是可提示的 DTP 字串

  • IgnoreCase 為 "true"。

假設下列值為輸入:

  • [Mbr]: "P_100"

  • [Match_String_Mbr] "\p{Alnum}",是會傳回英數字元的 Java 一般表示式。

在此範例中,[Matches_Mbr] 會傳回 "true"。