regexp_replace() function
Returns a string with the supplied regular expression replaced.
Syntax
regexp_replace(string,regex,after)
Arguments
string → is string. The start string.
regex → is string. The regular expression to replace. Backslash characters must be double escaped (eg "\\s" to match a white space character). Non-greedy regular expressions are not supported.
after → is string. The string that will replace any matching occurences of the supplied regular expression. Captured groups can be inserted into the replacement string using \\1, \\2, etc.
Example
regexp_replace('QGIS SHOULD ROCK','\\sSHOULD\\s',' DOES ') → 'QGIS DOES ROCK'