图像文件扩展名的验证表达式 [英] validation expression for image file extension
本文介绍了图像文件扩展名的验证表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要上传一张图片,但我的应用程序也需要pdf文件
所以请告诉我图像文件扩展名的验证表达式
i已经尝试过这个但是它没有工作
/^.*\.(jpg| jpeg | png | gif)$ / i
解决方案
/ i
试试这个:
(。*?)\。(jpg) | JPEG | PNG | GIF | JPG | JPEG | PNG | GIF)
i need to upload an image but my application takes pdf file also
so please tell me validation expression for image file extension
i have tried this below but its not working
/^.*\.(jpg|jpeg|png|gif)$/i
解决方案
/i
Try this:
(.*?)\.(jpg|jpeg|png|gif|JPG|JPEG|PNG|GIF)
这篇关于图像文件扩展名的验证表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文