Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^\b(0?\d|1[0-2]):[0-5]\d(\s)?([AaPp][Mm]$)
/
mg

Description

Support both capital and small letters, could be 01:00AM of 1:00AM

Submitted by VS - 2 years ago