Simplify regular expressions and extract the extended filename