Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

String Intrinsic Functions - IsMatch Method

Panel
bgColor#2c3c4c

Does the string match the regular expression

Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Boolean

True if the string matches the expression

Pattern

*Input

Unicode String

Regular expression to test

Details

The IsMatch method will return True if the string matches the specified regular expression.

Example

Wiki Markup\\ 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


See also

All Component Classes

Technical Reference