Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(\d{1,2})[:. ]?(\d{0,2})[:. ]?(\d{0,2})[:. ]?([ap]?\.?m\.?)?
/
igm

Description

Regex that selects hour, minute, second, and Meridiem Indicator from a string.

Submitted by PieterT2000 - 2 years ago