Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

RegEx - Tokenize

SylviaK
8 - Asteroid

Hi, 

 

Gradually getting familiar with the RegEx tool but not quite there yet. I have attached an excerpt of the data showing the input and the output that I want. 

 

I used the following as a regex expression: 

 

\u{2}\s\d.*\>\u{2}\s.*\-\s\(d.*) and then tokenize into rows

 

But got the Reg EX Mismatched brackets exception, not sure why though. Can someone pls help?

 

Many thanks

Sylvia

 

13 REPLIES 13
vizAlter
12 - Quasar

Hi @SylviaK —  "(" is missing.

 

(\u{2}\s\d.*\>\u{2}\s.*\-\s\(d.*)

Are you using this?

vizAlter_0-1598356361704.png

 

ImadZidan
12 - Quasar

Hello @SylviaK ,

 

It is the digit back slash. it should be in the brackets

 

you have: \u{2}\s\d.*\>\u{2}\s.*\-\s\(d.*)

should have: \u{2}\s\d.*\>\u{2}\s.*\-\s(\d.*)

SylviaK
8 - Asteroid

unfortunately, the output column is just blank, not how I wanted the output column to be (see previous attachment). Could there be something wrong with the expression?

SylviaK
8 - Asteroid

have tried this solution too. unfortunately, the output column is just blank, not how I wanted the output column to be (see previous attachment). Could there be something wrong with the expression?

vizAlter
12 - Quasar

@SylviaK — Are you working on "Sheet1" or "Sheet2"? and on which column?

 

Please attached your workflow for sample.

 

And, did you notice that if you use "Text To Columns" tool then you are getting results in more than 2 columns? so do you want only two columns?

 

vizAlter_0-1598363179170.png

 

ImadZidan
12 - Quasar

Hello @SylviaK ,

 

See if this does the job.

 

Hope this helps.

SylviaK
8 - Asteroid

Hi @ImadZidan 

 

Unfortunately it doesnt work. see attachment, for example I want cell A8 to be split into cell B8 and B9 as additional rows. The solution you provided is one additional column. 

 

Many thanks, 

Sylvia

SylviaK
8 - Asteroid

@vizAlter Thanks vizAlter. 

 

I am reattaching the file. with just one sheet. many thanks for your help

vizAlter
12 - Quasar

@SylviaK — Is it what you are looking for?

 

vizAlter_1-1598368010319.png

 

Labels
Top Solution Authors