Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Filter on Records that have line breaks?

AConcernedAnalyst
7 - Meteor

Hi all,

 

Wondering if anyone knew of a way to filter records with line breaks (if this is even possible)? I've tried the filters below but none work. Some records contain line breaks and some don't and I need to filter the records that do have line breaks so it can be processed a certain way. 

 

- Contains([COLUMN_NAME], \n)

- Contains([COLUMN_NAME], '\n')

 

Thank you

4 REPLIES 4
DataNath
17 - Castor
17 - Castor

May be \r\n rather than just \n? Can’t remember off the top of my head and not on my laptop sorry!

AConcernedAnalyst
7 - Meteor

@DataNath 

 

I tried 

 

- Contains([COLUMN], '\r\n')

- Contains([COLUMN], \r\n)

 

but neither worked. But based off your response, sounds like it is possible, which is good!

DataNath
17 - Castor
17 - Castor

Hopped into Alteryx and it turns out you can actually just hit enter within your RegEx match and that does the trick! Workbook attached.

 

Pattern is literally: ".+<ENTER>.+"

 

DataNath_0-1651708036731.png

 

Qiu
21 - Polaris
21 - Polaris

@AConcernedAnalyst 
Based on my test, the following RegEx works also.

REGEX_Match([Field1], '.+\n.+')

We can try a non RegEx approach also.

0505-AConcernedAnalyst.PNG

Labels
Top Solution Authors