Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\b((to|mon|tues|wed(nes)?|thur(s)?|fri|sat(ur)?|sun)(day)?)?|\d(\d?)(:\d\d)?(p|a)m
/
gm

Description

Regex for detecting common date/time formats.

Submitted by Gyen - 2 years ago