We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse fixed width - Number

jjg21
6 - Meteoroid

Hello Alteryx wizards!

 

I am having a hard time figuring out what I am doing wrong with my RegEx function.

I have what is essentially a UPC Code i.e. 0156483010299

 

For which I am attempting to parse as follows:

[01564830] [1029] [9]

        8             4      1

 

The current formula I used was: (\d{8})(\d{4})({\d{1})

 

which returns null values every time, but I found that if I only leave the first part of the equation (\d{8}) I get the desired result for the first 8.

I've scrounged through the other similar topics and videos and have only come up with results where there is a space or text involved so im wondering if there may be something with how I'm combining the difference output columns.

 

Appreciate the guidance!

 

 

 

3 REPLIES 3
apathetichell
20 - Arcturus

({\d{1}) is your problem.

 

That has to be (\d{1})

 

(\d{8})(\d{4})(\d{1}) in a regex tool set to parse works for me...

jjg21
6 - Meteoroid

Well. 

Now I feel like I can safely say I need to take a break from my computer.

 

Thank you VERY much for pointing out how easy of a fix that was.. very embarrassing 🙂

apathetichell
20 - Arcturus

Totally happens to all of us - your regex was solid.

Labels
Top Solution Authors