Alteryx Designer Desktop Discussions

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

I want to split a column using reg ex

cbohs002
7 - Meteor

I am reading in an unstructured pdf and want to split the txt into two columns.  

 

txt
10/31/9           R1    15            DEC 19 CBT T-BONDS 01 159-23 US
10/31/9           R1    15            DEC 19 CBT T-BONDS 01 159-29 US
10/31/9        R1                  59            DEC 19 CBT T-BONDS 01 160-25 US
10/31/9           R1                                        15 DEC 19 CBT T-BONDS 01 161-00 US
10/31/9           R1               60     DEC 19 CBT T-BONDS 01 161-05 US
10/31/9           R1       15       DEC 19 CBT T-BONDS 01 161-16 US
10/31/9          R1       15          DEC 19 CBT T-BONDS 01 161-18 US
10/31/9       R1 33         DEC 19 CBT T-BONDS 01 161.5681919 US

                R1       15          DEC 19 CBT T-BONDS 01 161-18 US

                 R1                  59            DEC 19 CBT T-BONDS 01 160-25 US

                R1                  59            DEC 19 CBT T-BONDS 01 160-25 US

In this example I want to split the columns up after there is an R1 and the number after. In the PDF not every example is using R1. Sometimes if could be like an F4 or FA or FC. Is there any type of expression I could use. Right now I am trying to use text to columns using \d{2}\s+ but that is not working. Any suggestions??

1 REPLY 1
OllieClarke
15 - Aurora
15 - Aurora

Hi @cbohs002 I used Regex in replace mode as follows:

OllieClarke_0-1575477484202.png

This puts a pipe ('|') after the number you have. I then split to 2 columns on '|' to get your desired output:

OllieClarke_2-1575477408525.png

Hope that helps,

 

Ollie

Labels