summaryrefslogtreecommitdiff
path: root/doc/it/weechat_user.it.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-01-26 10:15:35 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-01-26 10:15:35 +0100
commit6d217ca8c54b53a3741992c63eefb704fc9de906 (patch)
tree6ed90c91b7a6e162c29ed8e15e084a4d54c98214 /doc/it/weechat_user.it.adoc
parent73a4901fe1f3ed884efcbb49d204d1466215f89c (diff)
downloadweechat-6d217ca8c54b53a3741992c63eefb704fc9de906.zip
doc: fix regex examples to be compatible with FreeBSD
The following special sequences are not supported in regular expressions on FreeBSD: - "\w": replaced with "[a-zA-Z0-9_]" - "\S": replaced with "[^ ]" (it should be "[^ \t\n\r\f\v]", but in practice only spaces could be a problem when we use this sequence).
Diffstat (limited to 'doc/it/weechat_user.it.adoc')
-rw-r--r--doc/it/weechat_user.it.adoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc
index c02e3d740..70c6748fa 100644
--- a/doc/it/weechat_user.it.adoc
+++ b/doc/it/weechat_user.it.adoc
@@ -4057,7 +4057,7 @@ Matching groups can be used in "replace":
Example: use bold for words between "*":
----
-/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/
+/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/
----
Example: default trigger _server_pass_ uses this regular expression to hide
@@ -4065,7 +4065,7 @@ password in commands `/server` and `/connect` (chars in passwords are replaced
by `+*+`):
----
-==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5}
+==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5}
----
[NOTE]
@@ -4339,7 +4339,7 @@ string/string).
Display URLs in green:
----
-/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}=="
+/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}=="
----
[NOTE]