Regular Expressions 101

Community Patterns

Full Mime Type

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 - 3 years ago