string.replaceRegEx

This function replaces data in a string based on a regular expression match.

Syntax

string.replaceRegEx(expression, str, replace)

Arguments

Argument

Type

Description

expression

string

Characters from the source string are replaced based on the regular expression match.

str

string

Source string

replace

string

String to be replaced with

Returns

Type

Description

string

New string, where characters matching the regular expression are replaced with the <replace> string

Examples

The function string.replaceRegEx("foo.*", "seafood", "People") returns seaPeople.