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??
Solved! Go to Solution.
Hi @cbohs002 I used Regex in replace mode as follows:
This puts a pipe ('|') after the number you have. I then split to 2 columns on '|' to get your desired output:
Hope that helps,
Ollie