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

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

Re: why is this regexp invalid: "\\(?1:\\)"


From: Stefan Monnier
Subject: Re: why is this regexp invalid: "\\(?1:\\)"
Date: Wed, 08 Dec 2010 15:27:01 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> can you help me understand why the following simple
> expression gives an "Invalid regexp" error:

> (string-match "\\(?1:\\)" "")

> while removing the explicit group number gives no error:

> (string-match "\\(?:\\)" "")

My guess is that you're using a version of Emacs that is too old to
support explicit group numbers (which was a new feature in Emacs-23.1,
IIRC).


        Stefan


reply via email to

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