regex match too greedy to remove extensions