Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex_Match Tokenize\Parse suggestions

ramaram
5 - Atom

Hi y'all

 

I've a column's data in 2 kg:0.352-10 kg:0.8010-50 kg:1.0050-200 kg:10.00 format. 


Using
(\d+(-)?(\d+)?(\s)?kg:\d+\.\d{2}) regex I can match the 4 values that I'm looking for: "2 kg:0.35", "2-10 kg:0.80", "10-50 kg:1.00", & "50-200 kg:10.00" - https://regex101.com/r/SUenkc/1

 

For the life of me, I'm unable to use Regex's Tokenize and Parse to extract the data into 4 columns.

 

When using Tokenize, I'm getting "The Regular Expression in ParseSimple mode can have 0 or 1 Marked sections, no more."

 - see Tokenize.png

 

When using Parse, I'm seeing Parse.png

 

any ideas/suggestions?

- Alteryx Newbie

 

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @ramaram 

 

Provided the format is same and it splits into 4 parts. The below approach should work.

 

Use Regextool Parse config

atcodedog05_0-1601823910626.png

Patter:

(.*\skg:\d\d?.\d\d)(.*\skg:\d\d?.\d\d)(.*\skg:\d\d?.\d\d)(.*\skg:\d\d?.\d\d)

Output:

atcodedog05_1-1601823943399.png

 

Hope this helps 🙂

 

If this post helps you please mark it as solution. And give a like if you dont mind😀👍

ramaram
5 - Atom

Thanks @AT ... I see what you did there.

 

for some reason, the regex you gave didn't work for me, but I was able to tweak my Regex and select only the columns where the extract I'm looking for exist.

atcodedog05
22 - Nova
22 - Nova

Glad you sorted it out.

 

Happy to help 🙂

 

Cheers and happy analyzing 😀

Labels
Top Solution Authors