1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

core: improve the string_replace_regex function (add reference char, change syntax for match refs)

The reference char is now an argument for the function.
The references are now $0 .. $99 and $+ was added (last match, with
highest number).
The syntax to replace a match with one char is now: $.cN or $.c+
(for example: "$.*3").
This commit is contained in:
Sebastien Helleu
2014-02-09 15:14:07 +01:00
parent f666a356d7
commit 7c0d9fe850
6 changed files with 102 additions and 43 deletions
+2 -1
View File
@@ -114,7 +114,8 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
value = weechat_string_replace_regex (ptr_value,
trigger->regex[i].regex,
trigger->regex[i].replace_eval);
trigger->regex[i].replace_eval,
'$');
if (!value)
continue;