I'm trying to remove carriage return+line feeds using the REGEX_Replace function in the formula tool. In the screenshot below I have a simple test pipe delimited file with two fields, Description and Attempt, shown in Notepad ++ with the 'Show all characters' options selected so the carriage return+line feeds are visible.
I'm using the following REGEX_Replace function in the 'Description' field of my test file in order to test removing the extra Carriage Return+Line Feed showing in Line 4 of my test file: REGEX_Replace(Description, "\r*\n*", "")
I took this tip from the following link:
https://community.alteryx.com/t5/Data-Preparation-Blending/Remove-new-line-characters/td-p/8053
For the output I'm wanting to end up with my header and four output rows of data because in my test scenario, rows 4 and 5 are really one row.
When I run my simple test and browse the results, the extra Carriage Return+Line Feed remains. I've been playing around with this and cannot get it to work.
Below is a screenshot showing the results:
REGEX is new to me so I have a feeling I'm missing something basic. Any insight is appreciated!
Stuart
Solved! Go to Solution.
Hi,
I encountered the same problem where the text file contained carriage return + line feed. Were you able to find a solution that get rid of it?
Thanks!