Start Free Trial

Alteryx Designer Desktop Discussions

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

How to parse for special format

kennng
6 - Meteoroid

I have the following string types in the data:

 

ISS CUSHION FNDTN SPF-LI 12GM/.42OZ

IS RADIANCE PRMR SPF 20 40ML/1.4FLOZ
INTNSVE SKIN SERUM FN-WA 1.5ML/.05FLOZ

 

and I wish to parse the string into two parts: the unbold and bold ones

 

for the bold ones, the pattern is as follows:

1. after a space

2. contains a slash "/"

3. ends with 'OZ'

4. at the end of the string

 

thank you.

5 REPLIES 5
caltang
17 - Castor
17 - Castor

Like so:

image.png

(.*?) (\d+[^|]+)
Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
kennng
6 - Meteoroid

Hall Caltang,

 

thank you so much. it works well for most the case. however, some string without such expression also parsed into it.

 

such as  'INAVTI 3-STEP TRIAL K' is parsed into the following:

INAVTI

3-STEP TRIAL K

caltang
17 - Castor
17 - Castor

Just realized my REGEX didn't go all the way. No worries, added on top of it for you:

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

Err... that was not accounted for. REGEX follows patterns my friend.. so more examples are needed for me to understand and tell Alteryx what to do.

 

For the most part, I added some exceptions here:

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
kennng
6 - Meteoroid

Hallo Caltang, 

 

it works perfect now and thank you so much

Labels
Top Solution Authors