[Top][All Lists]

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

bug#6384: Teach rx explicitly numbered submatches

From: Juri Linkov
Subject: bug#6384: Teach rx explicitly numbered submatches
Date: Thu, 10 Jun 2010 18:51:04 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

>      (submatch                . (rx-submatch 1 nil)) ; SRE
> +    (submatch-n              . (rx-submatch-n 2 nil))

I think better would be to allow the existing subform `submatch'
to support numbered groups, i.e. in addition to the current form
`(submatch SEXP1 SEXP2 ...)' also support
`(submatch N SEXP1 SEXP2 ...)' because the number is a parameter
of normal groups.

There are already subforms that support different number of integer
arguments like `(repeat N SEXP)' and `(repeat N M SEXP)'.  So the same
could be done for `submatch' too.

Juri Linkov

reply via email to

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