Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<type>\w*)\/(?<tree>([\w\-]+\.)+)?(?<subtype>[\w\-]+)(\+(?<suffix>[\w\-\.]+))?(; (?<parameter>[\w+-\.=]+))?
/
g

Description

Full mime type tree

Submitted by Silvio Gratani - 4 years ago