Does the string match the regular expression |
Member of Compatible Unicode Intrinsic Functions (PRIM_LIBI.ICompatibleUnicodeIntrinsics)
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