diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-03-02 08:40:17 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-03-02 08:40:17 +0100 |
commit | cc5ab76186b6a1f842eb758a6997c54b1917c885 (patch) | |
tree | 1615304c9235856ae37c8bbb05fa6c2230a22122 /src/plugins | |
parent | ddf3e9043bed41a37d06bf3d5c6a104e7ddbeb79 (diff) | |
download | weechat-cc5ab76186b6a1f842eb758a6997c54b1917c885.zip |
trigger: allow chars '\' and '(' as delimiter in regex
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/trigger/trigger-config.c | 6 | ||||
-rw-r--r-- | src/plugins/trigger/trigger.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/trigger/trigger-config.c b/src/plugins/trigger/trigger-config.c index ff158a440..970929d77 100644 --- a/src/plugins/trigger/trigger-config.c +++ b/src/plugins/trigger/trigger-config.c @@ -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; diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index 45953dcb1..acb5bb4e1 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -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); |