Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?'commodity'02)_(?'market'\w{3,})_(?'tenortype'Q)(?'offset'[1-9][0-9]?)?_(?'derivative'PHY|FUT) (?'period'Q)-(?'year'\d{4})-\b(?'month'[1-4])\b$
/
gm

Description

handles atomic and combined tenor

Submitted by anonymous - 5 years ago