Start Free Trial

Alteryx Designer Desktop Discussions

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

How to parse (remove) the date from string, with the format MMM-YY or MMM'YY or MMM YY etc

Scarbrain
7 - Meteor

I have a string as per the below, the date can appear anywhere within the string, what is the best method to remove this text, as I want to see the text without any dates, so I can then join these further along in the workflow....

 

Alternatively, could you join these by ignoring the dates

 

Mar 25 customer name Lease Accruals
Feb 25 customer name Lease Accruals
customer namelease for Novt'24
customer namelease for Aug'23
Jan 25 customer name Lease Accruals
customer namelease for Aug'24
customer namelease for May'24
customer namelease for Dec'23
customer namelease for Oct'24
customer namelease for Feb'23
customer namelease for Apr'23

3 REPLIES 3
flying008
15 - Aurora

Hi, @Scarbrain 

 

FYI.

Spoiler
Trim(REGEX_Replace([Txt], "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[\s']\d{1,2}", ''))

录制_2025_04_16_08_29_05_938.gif

 

******

If can help you get your want, please mark it as a solution and give a like for more share.

Scarbrain
7 - Meteor

@flying008  thanks, almost there, forgot to include this one 

Nov-24 Additional

 

Will mark as solution

flying008
15 - Aurora

Hi, @Scarbrain 

 

Try this again: (Nov 24  & Nov'24 & Nov-24)

 

Trim(REGEX_Replace([Txt], "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[\s'\-]\d{1,2}", ''))

 

Labels
Top Solution Authors