Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
Created·2015-10-28 13:13
Updated·2023-07-20 21:38
Flavor·JavaScript

/
(0?[0-9]|1[0-9]|2[0-3]):[0-9]+:(0?[0-9]|[1-5][0-9])
/
Open regex in editor

Description

validates strings in time format HH:mm with hour in 24h format. only accepts up to 23:59

Submitted by Kelps Leite de Sousa