Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(0?[1-9]|1[0 12]):([0-5]\d)\s?((?:A|P)\.?M\.?)
/
ig

Description

parse valid time modified slightly from https://regexland.com/regex-time-am-pm/

Submitted by me - 3 years ago