[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18577: Regexp I-search: [(error Stack overflow in regexp matcher)]
From: |
Alan Mackenzie |
Subject: |
bug#18577: Regexp I-search: [(error Stack overflow in regexp matcher)] |
Date: |
Sun, 28 Sep 2014 12:37:17 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Good afternoon, Andreas!
On Sun, Sep 28, 2014 at 12:56:48PM +0200, Andreas Schwab wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > With point at BOB, do C-M-s and enter this regular expression at the
> > prompt:
> > /\*\(\([^'*]\|\*[^/']\)*\*?'\([^'*]\|\*[^/']\)*\*?'\)*\([^'*]\|\*[^'/]\)*\*?'\([^'*]\|\*[^/']\)*\*?\*/
> \(...\(...\)*...\)* is bad. \(...\)*\(...\)* is also bad.
But they both seem essential to the regexp's purpose.
> Both can cause combinatorial explosions in backtracking.
Is this a defect in my regexp or in the regexp engine? If the former,
how could I rewrite the regexp so that it would not hit these problems?
> Andreas.
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
--
Alan Mackenzie (Nuremberg, Germany).