--- lisp/emacs-lisp/re-builder.el 2007-03-08 15:44:12.000000000 +0100 +++ /tmp/re-builder.el 2007-03-09 16:22:18.000000000 +0100 @@ -639,11 +640,13 @@ (set-buffer reb-target-buffer) (reb-delete-overlays) (goto-char (point-min)) - (while (and (re-search-forward re (point-max) t) + (while (and (not (eobp)) + (re-search-forward re (point-max) t) (or (not reb-auto-match-limit) (< matches reb-auto-match-limit))) (if (= 0 (length (match-string 0))) - (error "Empty regular expression!")) + (unless (eobp) + (forward-char 1))) (let ((i 0) suffix max-suffix) (setq matches (1+ matches))