I want to create a dynamic regex regexReplace($Column Name$,"[^0-9]","") using String Manipulation (Variable) node or any appropriate node, where the column name is controlled by a flow variable.
The objective is to keep only the numbers in a given column (which may contain letters and special characters as well) and anything apart from the numbers will be replaced with null/blank.
I tried using join(“regexReplace($”, $${SColumn Name}$$, “$”, “,”,"[^0-9]",""), however, its not working. Any suggestions would be really helpful.
Thanks for the suggestion. However its not working for me. Please note the column name is controlled by a flow variable. How can I use flow variables in regex is another help I need.
Hi @Omprakash_Jena , while your column name is controlled by variable, your string manipulation is for manipulating the data in the column, so you would not use a (Variable) node, but rather use a data node, passing the column name as variable.
I use column expression to use dynamic column name and manipulate the data.
This is what the workflow looks like:
This is what I have as input data, and I called the column “Input”:
I defined the column name as a variable called “Column Name”:
And any manipulation is done according to the column that the variable “Column Name” has.