Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Separating data in row

senem127
5 - Atom

Hi, I want to separate the H0973B07 part in the data using the Formula or RegEx tools. Can you help me? Thanks.

 

Мабтера 500 мг/50 мл фл. 50 мл №1 (Рош Диагностикс), , H0973B07 до 01.01.2022

 

 

4 REPLIES 4
T_Willins
14 - Magnetar
14 - Magnetar

Hi @senem127,

 

If your data is always in a consistent format, you can use the formula .*?,\s,\s(.*?)\s in a RegEx parse.  This evaluate the string as follows:

 

.*?           Find all data until 

,\s,\s        It finds a comma, followed by a space, followed by a comma, followed by a space then

(.*?)         Return all data until

\s             A space

DawnDuong
13 - Pulsar
13 - Pulsar

hi @senem127 

Highly recommend that you watch the videos on Regex. It seems that the data extract problem you are attempting to solve involves some pretty unstructured data and one sample line may not not be sufficient to generalise the pattern of data you have.

Dawn.

mceleavey
17 - Castor
17 - Castor

Hi @senem127 ,

 

I've built this using regex with the regex tool configured as follows:

 

mceleavey_0-1623407324526.png

 

The regex expression is using the parse function, which parses out the section in parentheses and looks like this:

 

(\u\d{4}\u\d{2})

 

The breakdown of this is:

\u - Any uppercase letter

\d{4} - Followed by four digits

\u - Followed by an uppercase letter

\d{2} - Followed by 2 digits.

 

This provides the following output:

 

mceleavey_1-1623407460101.png

 

I've attached the workflow for you, but as @DawnDuong pointed out, I would strongly recommend you look at the resources available in the Academy area of the community to learn about parsing non-structured data.

You can find the those resources HERE.

 

I hope this helps,

 

M

 

 



Bulien

senem127
5 - Atom

Thank you everyone. " Мабтера 500 мг/50 мл фл. 50 мл №1 (Рош Диагностикс) " I couldn't separate this part. How can I do it?

Labels