Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

RegEx Help

markcurry
12 - Quasar

Hi, I'm trying to extract the day, month and year from some string values.  The month will be Jan, Feb, Mar... etc, but the RegEx statement I have is only returning the last letter of the month.  Any ideas would be greatly appreciated.

 

Sample Data

Payment was made on the 15 - Feb, 2021
Payment is due on 1st - Feb, 2021
Payment was made on the 13 - Dec, 2021
Payment was made on the 14th - Dec, 2021
Due on the 15 Dec 2021
Ignore this one due on the 15 Xyz 2021

 

The RegEx statement I have is... 

 

 

.*(?<!\d)(\d{1,2})[st|nd|rd|th]?.*([Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec]),?\s(\d{4}).*

 

 

 

Thanks

3 REPLIES 3
binuacs
20 - Arcturus

@markcurry 

 

binuacs_0-1641415236284.png

 

mmenth
11 - Bolide

Hi @markcurry 

 

You just don't need the brackets:
.*(?<!\d)(\d{1,2})[st|nd|rd|th]?.*(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec),?\s(\d{4}).*

 

Best,

mmenth

markcurry
12 - Quasar

@mmenth thanks a million, that did the trick.

Labels