LookBehind Regex alternativo
//(?<!filename)\.js$
^(?:(?!filename\.js$).)*\.js$
Grieving Gharial
//(?<!filename)\.js$
^(?:(?!filename\.js$).)*\.js$