Refactor filename regex for readability.