Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(\-((0[0-9]|1[0-2]):00|0[39]:30)|\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45))
/
gm

Description

A regular expression for timezones offsets as of July 29, 2022, see https://en.wikipedia.org/wiki/List_of_UTC_offsets.

Submitted by Hidayatullah Ahsan - 2 years ago