Regex for date

Status: Closed · Asked by John Gibson - PCOS Body Transformation Expert on · 0 views

kotakeio — Question ·

I'm not an expert at regex. How would I use regex to extract a date in the format MM/DD/YYYY like 10/26/2023?

Himesh Soni — Reply ·

You can use date/time formatter action, it'll give you output in your desired format.

Automation Freelancer
Contact me - https://www.facebook.com/himeshsoni07
Email - [EMAIL][email hidden][/EMAIL]
kotakeio — Reply ·

Thanks for the suggestion, but it's not what I need for my use. My workflow is a long string of data that has several dates in it. I would like to use the text formatter - extract pattern feature but can't figure out the regex. Here is something I've tried with no success. I'm not sure how it is structured wrong.

^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\d{4}$

Fagun Shah — Reply ·
Thanks for the suggestion, but it's not what I need for my use. My workflow is a long string of data that has several dates in it. I would like to use the text formatter - extract pattern feature but can't figure out the regex. Here is something I've tried with no success. I'm not sure how it is structured wrong.

^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\d{4}$


Provide sample string for testing.
Fagun Shah
- Automation Freelancer
- Let's Connect - https://www.facebook.com/fagun.shah.7/
kotakeio — Reply ·

EMAIL DATE: 11/01/2023
EMAIL TYPE: Personal Story Email

EMAIL DATE: 11/02/2023
EMAIL TYPE: Value Email

EMAIL DATE: 11/03/2023
EMAIL TYPE: Client Story Email

EMAIL DATE: 11/06/2023
EMAIL TYPE: Negative How To Email

EMAIL DATE: 11/07/2023
EMAIL TYPE: Value Email

EMAIL DATE: 11/08/2023
EMAIL TYPE: Personal Story Email

EMAIL DATE: 11/09/2023
EMAIL TYPE: Straight Offer Email

EMAIL DATE: 11/10/2023
EMAIL TYPE: Client Story Email

EMAIL DATE: 11/13/2023
EMAIL TYPE: Value Email

EMAIL DATE: 11/14/2023
EMAIL TYPE: Negative How To Email

EMAIL DATE: 11/15/2023
EMAIL TYPE: Personal Story Email

EMAIL DATE: 11/16/2023
EMAIL TYPE: Client Story Email

EMAIL DATE: 11/17/2023
EMAIL TYPE: Low-Ticket Offer Email

EMAIL DATE: 11/20/2023
EMAIL TYPE: Interview/Success Story Email

EMAIL DATE: 11/21/2023
EMAIL TYPE: Value Email

EMAIL DATE: 11/22/2023
EMAIL TYPE: Personal Story Email

EMAIL DATE: 11/23/2023
EMAIL TYPE: Client Story Email

EMAIL DATE: 11/24/2023
EMAIL TYPE: Straight Offer Email

EMAIL DATE: 11/27/2023
EMAIL TYPE: Negative How To Email

EMAIL DATE: 11/28/2023
EMAIL TYPE: Personal Story Email

EMAIL DATE: 11/29/2023
EMAIL TYPE: Value Email

EMAIL DATE: 11/30/2023
EMAIL TYPE: Client Story Email

Himesh Soni — Reply ·

Hello @kotakeio please use this regex :- \b\d{2}\/\d{2}\/\d{4}\b

Automation Freelancer
Contact me - https://www.facebook.com/himeshsoni07
Email - [EMAIL][email hidden][/EMAIL]
kotakeio — Reply ·

That is amazing! Thank you!

Back to all forum threads · Log in to reply