Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$
/

Description

check if the format is HH:MM (00:00 is OK, 0:00 is not)

Submitted by anonymous - 9 years ago