Match space before filename with regex