Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Text String Extraction

DelData
8 - Asteroid

Hi There,

 

I have a request where i need to extract the quarter details from the description column..

 

Trouble is this information is only on certain rows and folks put this information in different places in the description string and use different formats such as Q3-2024 or Q4/24 

 

As you see in RED below, this is what i need to extract.

 

In Green below, it shows you what i need....each description field is searched and a new column is created to show where quarter values have been found...

 

BEFORE

before.png

 

AFTER

after.png

 

Any help would be great :)

4 REPLIES 4
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@DelData Regex is likely a good solution here:

textParsing.png

The regex: 

(Q[^a-zA-Z ]+)

Says, if you're the letter and you're followed by characters that are not letters or spaces, extract that joined set of characters.

 

Hope that helps!

 

All the best,

BS

All the best,
BS

LinkedIN

Bulien
DelData
8 - Asteroid

Thank you for taking time out to help me......this works perfectly :)

The RegEx is something i not good on...so needed this help :)

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@DelData no worries. If you have any questions about it, feel free to ask. 

I actually learned regex by following these lessons: https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20... 

They're interactive and super useful. 

I'd recommend this website for learning: https://regex101.com/r/E95Yq9/1 
I've pasted your data in there, you can actually see the match with colours which helps you spot if you made the correct Regular Expression or not.

 

textParsing2.png

All the best,

BS

All the best,
BS

LinkedIN

Bulien
DelData
8 - Asteroid

Thank you....these links will help and look great.... :)

Labels