Regular Expressions 101

Community Patterns

1...34567...902

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?'commodity'02)_(?'market'\w{3,})_(?'tenortype1'[A-Z]+)(?'timeoffset'[1-9][0-9]?)?_(?'derivative'PHY|FUT) (?'tenor'(?'tenortype2'\w{1,3})-(?'year'\d{4})-(?'tenoroffset'\d{1,2})|\d{4}|[a-zA-Z\/ ]+)
/
gm

Description

handles atomic and combined tenor

Submitted by anonymous - 5 years ago