Navigation:  thinBasic Modules > VBRegExp >

VBRegExp_Test

Previous pageReturn to chapter overviewNext page

 

Description

 

Executes a regular expression search against a specified string and returns a Boolean value.

 

Syntax

 

n = VBRegExp_Test(pReg, sourceString)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

pReg

Numeric

No

Regular expression handle created with VBRegExp_New function

sourceString

String

No

The text string upon which the regular expression is executed

 

Remarks

 

The actual pattern for the regular expression search is set using VBRegExp_SetPattern function.

 

The VBRegExp_SetGlobal property set has no effect on the VBRegExp_Test method.

The VBRegExp_Test method returns True if a pattern match is found, False if no match is found.

 

Restrictions

 

See also

 

Examples