bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17373: 24.3.50; match data is incorrect if there are too many groups


From: Paul Eggert
Subject: bug#17373: 24.3.50; match data is incorrect if there are too many groups
Date: Sun, 18 May 2014 22:47:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Yes, unfortunately Emacs currently has a limit of at most 256 groups of match data: one for the entire pattern, and 255 for parenthesized subpatterns. If you go over the limit, the excess matches are silently discarded. I don't see this limitation documented anywhere; it should be. Or better yet, the limitation should be removed.

The limitation is wired into the representation of the 'start_memory' code in compiled regular expressions: this code has a one-byte operand. As far as I know, the limitation is specific to Emacs, and is not present in the Gnulib or glibc versions of the regexp matcher.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]