Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^data\:(?<type>image\/(png|tiff|jpg|gif|jpeg|bmp));base64,(?<data>[A-Z0-9\+\/\=])*$
/
i

Description

Determine if a base64 string is an image format

Submitted by anonymous - 6 years ago