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 to grab the text after third occurrence?

Biraj
7 - Meteor

Hi, I want to grab "T14 John Lewis" from "October 21 Accruals - Returns - US - T14 John Lewis - Triple".


Do you know what should be the Regex?

 

My Alteryx version: 2019.3.6

5 REPLIES 5
Qiu
21 - Polaris
21 - Polaris

@Biraj 
I can do better if had more data, but for now.

1203-Biraj-1.PNG1203-Biraj-2.PNG

binuacs
21 - Polaris
Spoiler
binuacs_0-1638513450978.png

 

Biraj
7 - Meteor

Hi, thanks for your reply. Text to column is fine. But I kind of want to use regex here. Some other data points are:

October 21 Accruals - Marketing - US - Y284 Target - Curve
October 21 Accruals - Marketing - Asia - General - Single
October 21 Accruals - Marketing - UK - General - Single

Biraj
7 - Meteor

Hi,

 

(.+?)\-(.+?)\-(.+?)\-(.*)\-(.*)

 

This worked better. Is there a way to parse and not replace?

binuacs
21 - Polaris

Changing Replace to Parse should work

Spoiler
binuacs_0-1638515922059.png

 

Labels
Top Solution Authors