You can't have multiple elemetns with the same ID, ID of an element in a document must be unique.
You can use a class to group similar elements then use the class selector.
Since you have used jQuery tag
<input type="file" name="image" class="fileUpload">
<input type="file" name="image" class="fileUpload">
<input type="file" name="image" class="fileUpload">
then
jQuery(function($){
var regex = /.\.(jpg|jpeg|png|gif|tiff)$/i;
$('.fileUpload').change(function () {
var filename = this.value;
if (!regex.test(filename)) {
$(this).replaceWith($(this).clone(true, true));// this.value = "" - does not work with IE
//see http://stackoverflow.com/questions/1043957/clearing-input-type-file-using-jquery
alert('Please select an image.');
}
});
})
Demo: Fiddle