My goal is to find and replace "_" underscore values found in the header (record, top row) row of data. After doing a formula concatenating values, it added several "_". I would like to replace all "_" with a space, and then have no more then one consecutive space in a row in each of the header fields. Thanks for you help.
Solved! Go to Solution.
A set of sample data would help us to better understand your requirement, but perhaps something like this?
Hi @cyeager
I used Regex and Dynamic Rename as below. Hope this helps.
It will go and replace _ repeated once or more with a space. Cheers!
I triple checked my spelling, but it doesn't recognize the variable. This is an interesting node that I haven't used before... I wonder if it would leave me with 3 blank spots in the middle of the field name, if it worked. Thank you for the idea. 🙂
ah, [_CurrentField_] is actually a variable specific to the Dynamic Rename Node... it worked with removing "_" and potentially trimming, but multiple spaces remained... I wonder if I would then build a find a replace (or formula) of if 4 blanks, replace with 1 blank, if 3 blanks replace with 1 blank, if 2 blanks replace with 1 blank type of script would finish it off. Thank you for the ideas.
Awesome! REGEX_Replace([_currentField_], "(_+)", " ") Thanks!