[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27659: 26.0.50; Add string-matched-text: string-match + match-string
From: |
Stefan Monnier |
Subject: |
bug#27659: 26.0.50; Add string-matched-text: string-match + match-string |
Date: |
Mon, 24 Jul 2017 10:30:51 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
> Pushed as ad4eff3b905dbc32e2d38bfec1e4f93eceec288d. I've renamed
> backref-var to backref as you suggested, but left `let' because I think
> that feature is important enough to deserve a short, common name.
Thanks.
> Sure! I'd suggest to change the syntax to be compatible with other
> languages:
>
> \(?<abc>[0-9]+\) or \(?'abc'[0-9+\) (Perl and .NET)
> \(?P<abc>[0-9]+\) (Python)
Fine by me. I'm surprised they didn't use the (?<var>:...) syntax,
since it seemed such an obvious choice, but maybe they wanted to allow :
in <var>.
Feel free to adapt my patch for that. BTW, the main reason why I didn't
push my patch originally is because of its inability to extract the
match-beginning/end of the named subgroup: it felt like
a serious shortcoming.
Stefan
bug#27659: 26.0.50; Add string-matched-text: string-match + match-string, Michael Heerdegen, 2017/07/21