From 474dd053e31761b55b3d6c4e85a1ef104db2a933 Mon Sep 17 00:00:00 2001 From: ber-ro <32487590+ber-ro@users.noreply.github.com> Date: Thu, 23 Feb 2023 13:39:14 +0100 Subject: [PATCH] Explain double backslashes (Windows) --- docs/appendix-d-filters.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/appendix-d-filters.md b/docs/appendix-d-filters.md index 81b54f5..86a0162 100644 --- a/docs/appendix-d-filters.md +++ b/docs/appendix-d-filters.md @@ -45,7 +45,7 @@ Meta group which contains all groups that are commonly excluded, which is curren In the UI, filters can be created using drop down boxes for common rule types. More advanced users can also use a textbox to specify multiple rules, with a rules to include starting with `+` and rules to exclude starting with `-`. -Using the command-line there are specific settings to specify include or exclude rules. These are `--include` and `--exclude`. Multiple rules can be specified by using `--include` or `--exclude` repeatedly. +Using the command-line there are specific settings to specify include or exclude rules. These are `--include` and `--exclude`. Multiple rules can be specified by using `--include` or `--exclude` repeatedly. Note that on Windows a trailing backslash (part of a folder rule) and only that must be doubled to avoid escaping the quotes. Thus a rule looks like `--exclude="*\a\folder rule\\"`. Backslashes in regular expressions must be doubled always: `--exclude="[.*\\a\\folder rule\\]"` ### Creating and validating your filters @@ -115,4 +115,4 @@ docker exec duplicati mono /app/duplicati/Duplicati.CommandLine.exe test-filters --exclude="[/mnt/[^/]*/.*\.log]" ``` -**Building Regular Expressions:** There are lots of online services such as [Skinners RegExp engine](https://regexr.com) to help build correct regular expressions. \ No newline at end of file +**Building Regular Expressions:** There are lots of online services such as [Skinners RegExp engine](https://regexr.com) to help build correct regular expressions.