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.
SOLVED

Parse a string using regex

Kcapron001
5 - Atom
I have a few variations of the string examples below

I am trying to parse

PubScheduleK-1
ScheduleK1extraletters
FormScheduleK-1extraletters
FormScheduleK1extraletters
PubScheduleA
ScheduleAextraletters
FormScheduleAextraletters
FormScheduleAtext


I want to extract the “K1” from the first 4 and “A” from the last four in the list.

I am basically trying to extract the schedule name.

Help?
1 REPLY 1
Thableaus
17 - Castor
17 - Castor

Hi @Kcapron001 

 

Would this work? Using Formula Tool, create a column with this formula

 

REGEX_Replace([Field],"^.*Schedule([^a-z]+).*$", "$1", 0)

 

This means - get everything that is not a lowercased letter after the word Schedule. Stop when you find a a lowercased letter.

 

Cheers,

 

Labels
Top Solution Authors