Alteryx Designer Desktop Discussions

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

Regex Parse Text based on length

janety0127
7 - Meteor

Hi,

I have a template where I need to parse company name to 2 fields: Company Name Line 1 and Company Name Line 2. I can only fit 35 characters in each cell. How do I configure the regex to parse a name so that it takes the first 36 characters into field 1 and the remaining into field 2? Thanks in advance.

2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @janety0127 ,

 

To do what you are looking for, your regex should be:

 

(.{36})(.*)

 

That means that the first capture group, I want to be any character 36 times, and the second group everything past those 36 characters.

 

 

AngelosPachis_0-1613167959176.png

 

Cheers

 

Angelos

 

SeanAdams
17 - Castor
17 - Castor

Hey @janety0127 ,

 

As @AngelosPachis says - you can use the {35} control.

 

Here are some regex resources to make your life easier:

 

 
Labels