[gnu.emacs.bug] backtracking fails in regexp

enami@ptgd.sony.co.jp (enami tsugutomo) (02/03/90)

Dear,

In GNU Emacs 18.55.0 of Mon Jan 29 1990 on chihaya (berkeley-unix)

My emacs says that the value of following expression is ("aaaa" . "a"),
but I think it should be ("aaa" . "a"), or an error.

(let ((str "aaaa"))
  (string-match "\\(a\\|bc\\)+\\(a\\)" str)
  (cons (substring str (match-beginning 1) (match-end 1))
	(substring str (match-beginning 2) (match-end 2)) ))

enami.