REPLACE(Full text, Old text, New text)
Replaces the content specified by the Old text in the Full text with the New text.
Full text
The text or referenced cell containing the substring to be replaced
Old text
The specified substring to be replaced
New text
The text used to replace the old text
Text
If the full text is NULL, the result is NULL.
If the full text is not NULL, but the old text is NULL, the function returns the original full text directly.
If the new text is NULL, the function removes the substring matching the old text from the full text and returns the result.
For example, you need to replace Group in the Customer Name field with Joint-Stock Company, as shown in the following figure.
Add a New Calculation Column operator in the Data Transformation node and input the formula REPLACE(Customer Name, "Group", "Joint-Stock Company "), as shown in the following figure.
More examples:
REPLACE("abcd","a","re")
rebcd
REPLACE("a**d","**d","rose")
arose
REPLACE(Full text, Starting position, Character count, New text)
Replaces part of the Full text with the New text, based on the specified Character count and Starting position.
Parameter 1
Parameter 2
Starting position
The starting point where the old text is replaced with the new text
Parameter 3
Character count
The number of characters in old text that need to be replaced with the new text
Parameter 4
For example, the function can be used to mask phone numbers by replacing certain digits with *****, as shown in the following figure.
REPLACE("0123456789",5,4,"*")
0123*89
REPLACE("1980",3,2,"99")
1999
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy