Alteryx Designer Desktop Discussions

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

Data Parse

Nandakishore
8 - Asteroid

Hi

 

Iam trying parse data using regex with : (\w+) as expression . But tool considers decimal as spac

9 REPLIES 9
Bren_Spill
11 - Bolide

Hi @Nandakishore - see attached. Does this help?

Nandakishore
8 - Asteroid

hi @Bren_Spill ,

 

It worked for that column . But it stopped parsing the other columns there on . Rest of the columns are null . 

Thanks.

apathetichell
18 - Pollux

Do you have sample data of your input and what you are looking for? decimal is not a \w in regex. If have additional characteristics you are looking for - you'll need to to specify them another way.

Swathi
8 - Asteroid

Try this in your RegEx 

 

(.*\..*)  

 

.*  - match any char except newline zero or more times 

\. - the actual dot 

.* - match any char except newline zero or more times

 

Please mark it as solution if it helps

 

 

Nandakishore
8 - Asteroid

hi @Swathi@apathetichell , @Bren_Spill  ,

 

My data is this : 12345.4566 ASDFGH QWERT

 

Result after parse must be :  

12345.4566ASDFGH

QWERT

 

When using the expression (\w+\.\w+) the result is : 

 

12345.4566NullNull

 

Thanks

gawa
15 - Aurora
15 - Aurora

hi @Nandakishore 

Please try the attached WF with regex as follows.

First captured group (-?\d+\.?\d*) can match any positive(+) or negative(-), integer/decimal. Please check it out. 

(-?\d+\.?\d*)\s(\w+)\s(\w+)

 

image.png

Nandakishore
8 - Asteroid

Hi @gawa  ,

 

This is not working . Regex is applied only to one column and rest are null.

 

Nandakishore
8 - Asteroid

@gawa  my data set looks like this : 

 

0000011 0 2.000 KGM 1 

gawa
15 - Aurora
15 - Aurora

@Nandakishore 

Now I see your point. If my understanding is correct, you should use Text to Column tool with space as a delimiter.

You can choose option (1) Split into columns or (2)Split into rows, whichever you like.

image.png

Regex tool is still an option, it seems Text to Column should be the best to pick first.

Labels