GNU bug report logs - #7227
re-search-forward goes infinite loop with dash inside []

Previous Next

Package: emacs;

Reported by: Jari Aalto <jari.aalto <at> cante.net>

Date: Sat, 16 Oct 2010 09:13:02 UTC

Severity: normal

Found in version 23.2+1-4

Done: Jari Aalto <jari.aalto <at> cante.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Jari Aalto <jari.aalto <at> cante.net>
Cc: 7227 <at> debbugs.gnu.org
Subject: bug#7227: re-search-forward goes infinite loop with dash inside []
Date: Sat, 16 Oct 2010 13:27:36 +0200
Jari Aalto <jari.aalto <at> cante.net> writes:

> Executing the following code causes Emacs to go into infinite loop.
> Simply run it behind the last paren with C-x C-e
>
> (re-search-forward "^\\([a-z0-9.-]+\\)+[ \t]+\\([0-9]+\\) +\\([a-z].*\\)")

Works fine here.

Note that nested repetitions like \([...]+\)+ are bad in any case.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 14 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.