string.replaceAll

This function returns a copy of the input string with all non-overlapping <old> instances are replaced by <new>.

Syntax

string.replaceAll(str, old, new)

Arguments

Argument

Type

Description

str

string

Source string

old

string

Old string that needs to be replaced

new

string

New string that replaces the old string

Returns

Type

Description

string

String with all occurrences of <old> replaced by <new>

Examples

The function string.replaceAll("hello flogo", "flogo", "world") returns hello world.