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

Extracting the word to the left after the second "," delimiter.

DMI10000
7 - Meteor

Hi all,
Please I need help with extracting the string to the left after the second ",". See a sample input and output solution below.

   

INPUT

OUTPUT

17 Randolf Road, FRANKLIN, London 2684

17 Randolf Road, FRANKLIN

10 Music Avenue, MANUREWA, Highbrow 2102

10 Music Avenue, MANUREWA

16 Sheep Road, IBIZZA, Otago 2102

16 Sheep Road, IBIZZA

17 Sea Avenue, FORTWITH, Auckland 2102

17 Sea Avenue, FORTWITH

 

Thanks

 

5 REPLIES 5
FinnCharlton
13 - Pulsar

Hi @DMI10000 , you can do this with the RegEx tool:

Screenshot 2023-07-28 133208.png

alexnajm
18 - Pollux
18 - Pollux

Done!

binuacs
21 - Polaris

@DMI10000 Another method

REGEX_Replace([INPUT], '(.*),.*', '$1')

image.png

DMI10000
7 - Meteor

Thank you all guys. They all worked and I am very grateful!

alexnajm
18 - Pollux
18 - Pollux

If all helped, can you mark all as a solution? Thank you!

Labels
Top Solution Authors