           (save-current-buffer
             (set-buffer vimgolf-work-buffer)
             (goto-char (point-min))
-            (search-forward "    \n  type: input" nil t)
+            (re-search-forward data-end-regexp nil t)
             (delete-region (match-beginning 0) (point-max))
             (decrease-left-margin (point-min) (point-max) 4)
             (goto-char (point-min))
             (vimgolf-mode t))
-          (search-forward "data: |+\n" nil t)
+          (re-search-forward data-start-regexp nil t)
           (append-to-buffer vimgolf-end-buffer (point) (point-max))
           (save-current-buffer
             (set-buffer vimgolf-end-buffer)
             (goto-char (point-min))
-            (search-forward "    \n  type: output")
+            (re-search-forward data-end-regexp)
             (delete-region (match-beginning 0) (point-max))
             (decrease-left-margin (point-min) (point-max) 4)
             (goto-char (point-min))

  (clear-dribble-file)
  (setq vimgolf-prior-window-configuration (current-window-configuration)
        vimgolf-challenge challenge-id)
  (let* ((vimgolf-yaml-buffer (url-retrieve-synchronously (vimgolf-challenge-url challenge-id))))
    (save-current-buffer
      (set-buffer vimgolf-yaml-buffer)
      (goto-char (point-min))
      (search-forward "data: |+\n" nil t)
      (if (get-buffer vimgolf-start-buffer-name) (kill-buffer vimgolf-start-buffer-name))
      (if (get-buffer vimgolf-work-buffer-name) (kill-buffer vimgolf-work-buffer-name))
      (if (get-buffer vimgolf-end-buffer-name) (kill-buffer vimgolf-end-buffer-name))

          (save-current-buffer
            (set-buffer vimgolf-start-buffer)
            (goto-char (point-min))
            (re-search-forward data-end-regexp nil t)
            (delete-region (match-beginning 0) (point-max))
            (decrease-left-margin (point-min) (point-max) 4)
            (goto-char (point-min))
