VBRegExp_Replace

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > VBRegExp >

VBRegExp_Replace

 

Description

 

Replaces text found in a regular expression search.

 

Syntax

 

s = VBRegExp_Replace(pReg, sourceString, replaceString)

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

pReg

Numeric

No

Regular expression handle created with VBRegExp_New function

sourceString

String

No

The text string in which the text replacement is to occur

replaceString

String

No

The replacement text string

 

Remarks

 

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

 

VBRegExp_Replace returns a copy of sourceString with the text of regular expression pattern replaced with replaceString.

If no match is found, a copy of sourceString is returned unchanged.

 

Restrictions

 

See also

 

Examples