mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36: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:
@@ -618,12 +618,12 @@ trigger_command_init ()
|
||||
" replace password with '*' in /oper command (in command line and "
|
||||
"command history):\n"
|
||||
" /trigger add oper modifier input_text_display;history_add "
|
||||
"\"\" \"==^(/oper +\\S+ +)(.*)==\\1\\*2\"\n"
|
||||
"\"\" \"==^(/oper +\\S+ +)(.*)==$1$.*2\"\n"
|
||||
" add text attributes in *bold*, _underline_ and /italic/:\n"
|
||||
" /trigger add effects modifier weechat_print \"\" "
|
||||
"\"==\\*(\\S+)\\*==*${color:bold}\\1${color:-bold}*== "
|
||||
"==_(\\S+)_==_${color:underline}\\1${color:-underline}_== "
|
||||
"==/(\\S+)/==/${color:italic}\\1${color:-italic}/\"\n"
|
||||
"\"==\\*(\\S+)\\*==*${color:bold}$1${color:-bold}*== "
|
||||
"==_(\\S+)_==_${color:underline}$1${color:-underline}_== "
|
||||
"==/(\\S+)/==/${color:italic}$1${color:-italic}/\"\n"
|
||||
" silently save config each hour:\n"
|
||||
" /trigger add cfgsave timer 3600000;0;0 \"\" \"\" \"/mute /save\""),
|
||||
"list|listfull"
|
||||
|
||||
Reference in New Issue
Block a user