IsPatternInField

Checks that the value of the current field contains the specified VBScript regular expression.

Syntax

bool IsPatternInField (StrParam)

Parameters

String value of the Regular Expression. The expression can include any Regular Expression characters. Smart parameters are supported.

Returns

True, if the pattern is found within the field. Otherwise, False.

Level

All, but generally at the Field level.

Details

Uses VBScript Regular Expression Pattern entered as parameter to search for a matching pattern in the Text value of the current object.
Attention: If you are using an input boundary, ^, it must be followed by a space and then the remainder of the search string.
Example
IsPatternInField("[\^\b\s\n\r]*Inv[oO0][iItl1]ce[\b\s]*")
IsPatternInField("@STRING([\^\b\s\n\r]*Inv[oO0][iItl1]ce[\b\s]*)") 

This example searches for the word “Invoice” in the current field. To allow for recognition errors, the search allows for common recognition substitutions in “o” and “i” by matching “Invoice”, “InvOice”, “Inv0ice”, “Inv01ce”, “Involce”, and so on. The search also ignores any text that is placed before or after the word. Encapsulating the parameter with @STRING is recommended when the value is not a Smart Parameter.