Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
Created·2016-03-23 08:24
Flavor·PCRE (Legacy)

/
^(\d{1,2}[h])$|^(\d+[m])$|^((\d{1,2}[h])\s((([0]?|[1-5]{1})[0-9])[m]))$
/
i
Open regex in editor

Description

Match time duration in the following formats only: 1h 30m 59m 1h 33m 11h 2m

Submitted by Pooja Khorjuvekar