Undo pattern in different file formats