String Intrinsic Functions - IsMatch Method
Does the string match the regular expression
Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)
Name |
Type |
Data Type |
Description |
Result |
*Result (Optional) |
Boolean |
True if the string matches the expression |
Pattern |
*Input |
Unicode String |
Regular expression to test |
The IsMatch method will return True if the string matches the specified regular expression.
\\
In this example, the value entered is tested to ensure that it is all uppercase.
\\
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 |
All Component Classes
Technical Reference