You need to create a function that is not case sensitive.
$results.find('a').filter(function(){return /\.doc$/i.test(this.href);});
You can also list all 8 cases in the selector, but it will not scale easily.
$results.find('a[href$=".doc"],a[href$=".doC"],a[href$=".dOc"],a[href$=".dOC"],a[href$=".Doc"],a[href$=".DoC"],a[href$=".DOc"],a[href$=".DOC"]')
source
share