Regular Expressions 101

Community Patterns

Regex to match the image mime types

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(^image)(\/)[a-zA-Z0-9_]*
/
gm

Description

Matches the image mime types. E.g image/png, image/jpeg, etc.

Submitted by anonymous - 2 years ago