Added feature to preserve files by regex

Please merge this feature