We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Pulling out multiple pieces of data from multiple combinations of strings

JonaV90
7 - Meteor

Hi,

 

I am trying to pull the underlined data in multiple columns from the string in the non underlined field (not including the - )

 

There are more than these combinations, but could anyone help me set up a formula to pull these pieces of information out of the string combinations below?

 

HAT2TOPL34Rental 16ft Box TruckP - 10 Characters at the beginning, Rental, 16ft Box Truck, P

HAT2TOPL35Branded 24ft Box Truck (Element - Leased)P - 10 Characters at the beginning, Branded, 24ft Box Truck, Element, Leased, P

HPX3CL34Rental VanP - 6 Characters at the beginning, Rental, Van, P

HBF4ALPC32Owned VanP - 10 Characters at the beginning, Owned, Van, P

 

Thanks,

 

 

6 REPLIES 6
davidskaife
14 - Magnetar

 

Hi @JonaV90 

 

This Regex should give you what you need, if i understand what you're looking for correctly!

 

 

([[:alpha:]]+\d+[[:alpha:]]+\d+)(.+?)\s(.*)(P)$

 

DavidSkaife_0-1665046122707.png

 

binuacs
21 - Polaris

@JonaV90 One way of doing this

binuacs_0-1665005366113.png

 

gyang3
Alteryx Alumni (Retired)

hey @JonaV90 

 

See attached the workflow. I've added an additional tool to parse out those in parentheses.

 

gyang3_0-1665012928249.png

 

Let me know if this works and please mark as solved if so.

JonaV90
7 - Meteor

Hi,

 

Thanks so much for this.

 

This is close to where I'm trying to get to.

 

What I am missing is that I also want to isolate the vehicle type, so in the screenshot you shared I want to have an additional column that only says 24ft Box Truck (without including the additional text), 16ft Box Truck, Van, etc.

 

Can you help isolate that?

 

Thanks,

 

 

binuacs
21 - Polaris

@JonaV90 

 

binuacs_0-1665439817966.png

 

JonaV90
7 - Meteor

Ok, this is great.

 

It would be better if all of this could be simplified into one regex tool

 

One more thing, I have 3 more additional instances in the data that I need to pull the key info from. See below:

I would appreciate anyone's help adding this to the regex tool

 

Additional:

HAT2CSTG34Owned Van incl. New PSD Insurance PaymentP - 10 Characters at the beginning, Owned, Van, New PSD insurance Payment, P
HAT2CSTG34Rental 16ft Box Truck incl. New PSD Insurance PaymentP - 10 Characters at the beginning, Rental, 16ft Box Truck, NEW PSD insurance Payment, P

HVP1MEM335Rental VanP - 10 Characters at the beginning (3 numbers at the end), Rental, Van, P

 

Original:

HAT2TOPL34Rental 16ft Box TruckP - 10 Characters at the beginning, Rental, 16ft Box Truck, P

HAT2TOPL35Branded 24ft Box Truck (Element - Leased)P - 10 Characters at the beginning, Branded, 24ft Box Truck, Element, Leased, P

HPX3CL34Rental VanP - 6 Characters at the beginning, Rental, Van, P

HBF4ALPC32Owned VanP - 10 Characters at the beginning, Owned, Van, P

 

Thanks,

Labels
Top Solution Authors