Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
([0-9]|[0-1][0-2])\:?([0-5][0-9])? ([A|P]M) to ([0-9]|[0-1][0-2])\:?([0-5][0-9])? ([A|P]M)
/
gm

Description

This is a re that can validate time with date with AM and PM

Submitted by anonymous - 2 years ago