Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-07-14 03:19
Flavor·PCRE (Legacy)

/
([0-9]{1,2}:?(?:[0-9]{2})?)-([0-9]{1,2}:?(?:[0-9]{2})?)\s(AM|PM)
/
ig
Open regex in editor

Description

I use this to extract and later calculate the difference between two times.

Submitted by Ernie C.