Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex data conversion

Shaaz
9 - Comet

Hi,

 

I've below the data with code and RegEx expression of it (highlighted in yellow) and I need to convert the code as per RegEx Expression and it should be dynamic.

 

I need to get output as highlighted in Green

 

Shabaz_0-1641198653423.png

 

6 REPLIES 6
Qiu
21 - Polaris
21 - Polaris

@Shaaz 
Are the RegEx patterns listed all?

Shaaz
9 - Comet

We get list of regex Codes.

grchavarri
11 - Bolide

Hi @Shaaz 

I was trying to do it as simple as possible but unfortunately im not getting the result because im missing something in the config. But im leving you here what i was trying just if someone get some ideas or know how to complete that. 

grchavarri_0-1641202801185.png

 

As a solution, the best way to do what you are looking for is with a batch macro where you change the input and the operation dynamicly. 

Please find the image 

grchavarri_1-1641203087396.png

Hope it helps, 

 

Pd, ive tried some of the regex that where in the list, and some of them are not working as you mentioned. At least in regex101

 

Best,

 

atcodedog05
22 - Nova
22 - Nova

Hi @Shaaz 

 

Edit:

This is interestingly a tricky one. Can you please share the above input data (data in screenshot) as an excel file.


We will be happy to help : )

Shaaz
9 - Comet

Here is the sample data in excel.

apathetichell
20 - Arcturus

@Shaaz- your regex is wrong.  You cannot get the output you are looking for from this input with the regex expressions you are using. This cannot work. You cannot throw in 4009 to that  regex expression and magically create 04009-0411.

 

@grchavarri- good try on your approach. I'd recommend adding a filter tool prior the regex tool.

 

 

Labels
Top Solution Authors