Regular Expressions 101

Community Patterns

Clean Date Finder

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s(\d\d?)(st|nd|rd|th)?,?\s(\d{4})|(\d\d?)[\.\/-](\d\d?)[\.\/-](\d{4})
/
gm

Description

Find dates of multiple formats in a clean way

Searchable Formats: -Month day year -Month day, year -Mon day year -Mon day, year -MM/DD/YYYY -MM.DD.YYYY -MM-DD-YYYY

Submitted by anonymous - 10 months ago