replace node

Hello
I have an Excel file containing a column of phone numbers that I want to read the tables of a column and replace the first two characters of the numbers in each cell with another number.
for example
Numbers like 9812345678 which are inside each cell of the table column that I want to replace the first two characters of the expression (98) with the number 0.
It is necessary to explain that there is nothing wrong with converting the numbers into strings

The string manipulation node will allow you to do this, using one of its many replace functions.

4 Likes

Hello @alex1368,

as @elsamuel said you can use String Manipulation node but not sure how to do it with replace function(s) unless he was thinking regex (not saying you can’t just I don’t know!). What you can also use is the combination of join() and substr() functions. The following expression should do the trick:
join("0", substr($yourColumnName$,2) )

Br,
Ivan

4 Likes

I was indeed thinking about the regexReplace function.

An expression like regexReplace($column1$,"^[0-9]{2}" ,"0") seems to work.

2 Likes

Hello
Thank you for your guidance
I didn’t find that regexReplace node
Is it possible to show me how to do this in a visual or typed way?

Hi @alex1368 as both @elsamuel and @ipazin have explained, the node is the String Manipulation node.

The regexReplace() that @elsamuel proposed is a function that you can use in the String Manipulation node, or similarly the join() function that @ipazin proposed is also part of the String Manipulation node

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.