Alteryx Designer Desktop Discussions

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

Regex for multiple numbers within a cell

sergiogarciagt
7 - Meteor

Hi,

 

I am trying to extract from the description below, the number 411011, however it is returning me the 2021. I am using the following regex "(\d+[A-Z]*)(?!.*\d)", any ideas on how to fix it?

 

Thanks,

REVENUES - OPERATIONS:41000 Tuition and Fees:411011 · Registration:2020-2021 Registration Fees

 

sergiogarciagt_0-1631052709058.png

 

5 REPLIES 5
Tyro_abc
11 - Bolide

@sergiogarciagt  - can you check if the formula below works for you?

 

(.*):(\d+)(.*):(\d+).*:(.\d+-\d+)\s(.*)

 

Tyro_abc_0-1631060457639.png

Regards

Arundhuti

Tyro_abc
11 - Bolide

Forgot to attach workflow

sergiogarciagt
7 - Meteor

Hi,

Thank you for your help. I tried the formula and it parses the data, however it created 6 different regex outputs. Is there any way of having it to select just the numbers I want. Another formula I have been using is "(\d+[A-Z]*)(?!.*[^ -/'$#\|\d+]\d)" but this one returns 2020 so it still does not get the account number 411011. The tricky part with this description is that it contains accounts plus sub accounts in the same cell.

 

sergiogarciagt_0-1631063966245.png

 

Tyro_abc
11 - Bolide

Like this?

Tyro_abc_0-1631064144170.png

 

sergiogarciagt
7 - Meteor

Thank you,

This works better!

SG

Labels