Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
((in) )?(today|tomorrow|yesterday|sunday|monday|tuesday|wednesday|thursday|friday|saturday|(one|two|three|four) (hours|weeks|months|years))( ago)?( at (\d\d?:\d\d|\d\d?) ?(am|pm|AM|PM)?)?
/
gm

Description

Dates in fluent language

Submitted by xxx - 3 years ago