javascript - What is wrong with my Regex? -


i'm using javascript test ending of file selected uploaded server.

the regex this:

(jpg|jpeg|png|gif|bmp)$

and works fine long file extensions in lower case, when this

/(jpg|jpeg|png|gif|bmp)$/i

i doesn't match anything.

can tell me why? doing wrong?

use 'i' parameter i.e. regexp("(jpg|jpeg|png|gif|bmp)$", "i")


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -