I have prblem with dynamically created RegExp object (in the file upload plugin)
This is a initialization code of the plugin:
$('#fileupload').fileupload('option', {
acceptFileTypes: /(\.|\/)(doc|pdf)$/i
});
That code changes the regex:
$('#files-list').change(function() {
$('#fileupload').fileupload(
'option',
'acceptFileTypes',
new RegExp('(\.|\/)('+$(this).find(":selected").attr('f-ext')+')$/i')
);
});
and it adds the / char at the beggining and at the end of that regex.
See the image below. The 1st & 2nd line is after the plugin initialization, the 3rd and the 4th line. That causes the file name validation fail.

How to fix it ?
To use case insensitive modifier you should do the next