1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 10:13:12 +02:00

trigger: allow chars '\' and '(' as delimiter in regex

This commit is contained in:
Sebastien Helleu
2014-03-02 08:40:17 +01:00
parent ddf3e9043b
commit cc5ab76186
14 changed files with 44 additions and 58 deletions
+3 -3
View File
@@ -310,9 +310,9 @@ trigger_config_create_trigger_option (const char *trigger_name, int index_option
"many regex can be separated by a space, for example: "
"\"/regex1/replace1/var1 /regex2/replace2/var2\"; the "
"separator \"/\" can be replaced by any char (one or more "
"identical chars), except '\\' and parentheses; matching "
"groups can be used in replace: $0 to $99, $+ for last "
"match and $.cN to replace all chars of group N by char c"),
"identical chars); matching groups can be used in replace: "
"$0 to $99, $+ for last match and $.cN to replace all chars "
"of group N by char c"),
NULL, 0, 0, value, NULL, 0, NULL, NULL,
&trigger_config_change_trigger_regex, NULL, NULL, NULL);
break;
-2
View File
@@ -534,8 +534,6 @@ trigger_regex_split (const char *str_regex,
delimiter = weechat_strndup (ptr_regex, pos - ptr_regex);
if (!delimiter)
goto memory_error;
if ((strcmp (delimiter, "\\") == 0) || (strcmp (delimiter, "(") == 0))
goto format_error;
length_delimiter = strlen (delimiter);