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
Solved! Go to Solution.
Hi @ramaram
Provided the format is same and it splits into 4 parts. The below approach should work.
Use Regextool Parse config
Patter:
(.*\skg:\d\d?.\d\d)(.*\skg:\d\d?.\d\d)(.*\skg:\d\d?.\d\d)(.*\skg:\d\d?.\d\d)
Output:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind😀👍
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.
Glad you sorted it out.
Happy to help 🙂
Cheers and happy analyzing 😀