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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user