Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

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

Description

handles atomic and combined tenor

Submitted by anonymous - 5 years ago