Alteryx Designer Desktop Discussions

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

PARSING DATA

dunkindonut7777
8 - Asteroid

Hello I want to know if how can I parse this using regex tool? I only want to extract the digits in the middle.

 

Number CodeExpected Output
10.10.000.111225.000.000.00111225

 

Can you help me with this one please?

8 REPLIES 8
Qiu
20 - Arcturus
20 - Arcturus

@dunkindonut7777 
How do you define the "Middle"?

After 3 Periods "."?

dunkindonut7777
8 - Asteroid

Yes

Qiu
20 - Arcturus
20 - Arcturus

@dunkindonut7777 
We can use RegEx to parse the data.
I use the web site below to build and test my RegEx.

https://regex101.com/

1011-dunkindonut7777.PNG

Yoshiro_Fujimori
15 - Aurora

Hi @dunkindonut7777 ,

 

If that is the case, I think you can do it without RegEx.

 

Formula Tool

1. replace "." to whitespace.

Output = Replace([Number Code], ".", " ")

 

2. Count the words, find the "middle" position, and get the word at the position.

Output = GetWord([Output], FLOOR(CountWords([Output]) / 2))

 

I hope this works.

flying008
14 - Magnetar

Hi, @dunkindonut7777 

 

Just like @Yoshiro_Fujimori  said:

 

GetWord(Replace([Txt], '.', ' '), FLOOR(CountWords(Replace([Txt], '.', ' '))/2))
dunkindonut7777
8 - Asteroid

Hello Thank you for this. How about this one. 

NumberExpected Output
113302113302
CCD08CCD08
22 CCD INCD 0522 CCD INCD 05
540013.1540013
540321.19999999995540321

 

 I only want to extract the first 6 digits, without touching the other value in column. Can you helm me with this one?

Qiu
20 - Arcturus
20 - Arcturus

@dunkindonut7777 
I would use the RegEx_Match function as below.

1011-dunkindonut7777-B.PNG

dunkindonut7777
8 - Asteroid

hello can you provide the alteryx file or the formula so that I can copy paste and edit?

Labels