Regular Expressions 101

Community Patterns

Different date format and label them accordingly

0

Regular Expression
ECMAScript (JavaScript)

/
(?:(?<dateShort>\d\d\/\d\d\/\d{4})|(?<dateLong>\w* \d\d, \d{4})|(?<dateISO>\d{4}-\d\d-\d\d)).*label:\s(?<label>\w*)\)
/
gmi

Description

Classify <dateShort> \d\d / \d\d / \d{4} <dateLong> \w* \d\d, \d{4} <dateISO> \d{4}-\d\d-\d\d

and label them

Submitted by anonymous - a year ago