|
From: | Tino Calancha |
Subject: | bug#27659: 26.0.50; Add string-matched-text: string-match + match-string |
Date: | Fri, 21 Jul 2017 23:08:39 +0900 (JST) |
User-agent: | Alpine 2.20 (DEB 67 2015-01-07) |
On Fri, 21 Jul 2017, Stefan Monnier wrote:
Although, i must admit i am not fluent in `rx' syntaxis, i find your idea very nice.If you prefer the standard/cryptic regexp syntax, I posted a similar thingy in the past (see below). This lets you do (pcase "foo-123" ((re-match "[[:alpha:]]+-\\(?num:[0-9]+\\)") num)) => "123" Maybe I should install it in pcase.el?
This is nice too, and it looks familiar to me. A pity that it doesn't accept back references, but to be honest weirdly use them. For me it's useful to have it to study the code and learn how these things are implemented; but i understand that is not an encouraged argument.
[Prev in Thread] | Current Thread | [Next in Thread] |