replace() function

Returns a string with the the supplied string replaced.

Syntax

replace(string,before,after)

Arguments

string → is string. The start string.
before → is string. The string to replace.
after → is string. The string that will replace before

Example

replace('QGIS SHOULD ROCK','SHOULD','DOES') → 'QGIS DOES ROCK'