文字列は正規表現に一致するか
String組み込みファンクション (PRIM_LIBI.ICommonStringIntrinsics) のメンバ

パラメータ

名前

タイプ

データタイプ

記述

Result

*Result (任意)

ブール値

文字列が正規表現に一致する場合TRUE

Pattern

*Input

Unicode 文字列

テストする正規表現

詳細


IsMatch メソッドは、文字列が指定の正規表現と一致する場合 TRUE を返します。

\\
以下の例では、入力された値がすべて大文字かどうかがテストされています。
\\
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(456) Width(864)
 \\
   Define_Com Class(#PRIM_MD.Edit) Name(#Edit) DisplayPosition(1) Parent(#COM_OWNER) TabPosition(1) Label('Uppercase only')
 \\
   Evtroutine Handling(#Edit.Changed)
 \\
      #Edit.ClearError
 \\
      If (*Not #Edit.Value.IsMatch( "^\[A-Z\]+$" ))
 \\
         #Edit.ShowError( "Must be uppercase" )
 \\
      Endif
 \\
   Endroutine
 \\
End_Com

参照

すべてのコンポーネント クラス
テクニカルリファレンス