Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE2 (PHP >=7.3)

/
^([MTWFS][\w]{2},) (\d{2}) ([A-Z][a-z]{2}) (\d{4}) (\d{2}:\d{2}:\d{2}) ([A-Z]{3,}|[+\-]\d+)$
/
gm

Description

Test your RSS pubDate has a correctly formatted date value according to the RFC822 standard It will match timeZoneName (eg GMT, EST) or time zone offset (eg. +0100)

Submitted by anonymous - 5 months ago (Last modified 5 months ago)