From bb00b6b8fb895e85d2959bebba9d49fe9de61438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 30 Mar 2017 22:13:14 +0200 Subject: core: add ${re:#} to get the index of last group captured in evaluation of expressions --- doc/it/weechat_plugin_api.it.adoc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'doc/it') diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 31e610f08..8f70f1402 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -2136,9 +2136,18 @@ expanded to last): | `+${re:N}+` | Regex captured group: `0` = whole string matching, `1` to `99` = group - captured, `+++` = last group captured. | - `+${re:1}+` | - `+test+` + captured, `+++` = last group captured, + `#` = index of last group captured (_WeeChat ≥ 1.8_). | + `+${re:0}+` + + `+${re:1}+` + + `+${re:2}+` + + `+${re:+++}+` + + `+${re:#}+` | + `+test1 test2+` + + `+test1+` + + `+test2+` + + `+test2+` + + `+2+` | `+${color:name}+` | WeeChat color code (the name of color has optional attributes), -- cgit v1.2.3