REPLACEALL

Syntax

REPLACEALL(<string>; <string with regular expression>[; <string with replacement>])

Description

Replaces each substring of this string that matches the given regular expression with the given replacement.

Datameer tries to match entire record without automatically adding ^ or $ to the regular expression. But if the record has multiple lines, then this must be accounted for with (?s) or line terminators. 


There is a difference in expressions between the Formula Builder and the Formula Bar.


With the Formula Builder, if you are writing regular expressions, you can use normal syntax. A backslash (\) is used to separate each expression.


With the Formula Bar, if you are writing regular expressions you need to include an extra backslash (\) between each expression. This extra backslash between expressions is due to Datameer using the backslash as an escape character.

Examples

StringRegular expressionString with replacementREPLACEALL returns
2 years, two years(2|two)33 years, 3 years
a   b    c
[ ]+-a-b-c
a   b    c
[ ]+nullabc