Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-07-28 22:01
Updated·2024-07-29 12:50
Flavor·JavaScript

/
(?<=(UTC|GMT))([+-])((\d{2}:\d{2})|(\d{4}|\d{2}))\b
/
gmi
Open regex in editor

Description

match offset from utc offset string returned by the timeZoneName property of an Intl.DateTimeFormat object. (see MDN documentation here)

Submitted by Lagoffre