Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I would like to allow a field in a form I have to allow only file names to be accepted. File names looks like this:

431714620407606949.jpg

18 digits [dot] jpg/gif/ico/png/tiff

Also I would like the field to accept multiple file name entries, so I want it to be like this:

431714620407606949.jpg,431714620407674859.jpg,837593620407606949.jpg
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
234 views
Welcome To Ask or Share your Answers For Others

1 Answer

This should do it: http://regexr.com?353i8 (/([d]{18}.)(jpg|png|gif)/g)

This site will help you with your regex'


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...