Reputation: 62773
I'm working on a Gulp build script to run jsHint, minimize/compress JS and CSS, move HTML files and other various build tasks.
I'd like to create a task to move all image files from a specific directory. Is there a generic pattern to match .png
', .gif
, .jpg
and other common image file types?
Upvotes: 2
Views: 1354
Reputation: 4135
The file name matching pattern would take whichever extensions you're after and put them in a case-insensitive or-ed group like this:
.*\.(?:jpg|gif|png|bmp)$
See here for a list of possible file extensions (if interested): http://en.wikipedia.org/wiki/Image_file_formats#Stereo_formats
Upvotes: 4