Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-03-18 09:42
Flavor·PCRE (Legacy)

/
^((0?[1-9]{1})|(1{1}[0-2]{1}))((:[0-5][0-9])?)(A|P)$
/
i
Open regex in editor

Description

matches time in 12 hour format For Eg: 1a 1A 1p 1P 01a 01:12a 02:59p

Submitted by Pooja Khorjuvekar