# Regex like \[Tf\]rash supported?

**URL:** <https://forum.duplicati.com/t/regex-like-tf-rash-supported/6089>\
**Category:** Support\
**Created:** [January 22, 2019, 3:41am UTC](https://forum.duplicati.com/t/regex-like-tf-rash-supported/6089 "2019-01-22T03:41:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkebler](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/43a26b/32.png) [@dkebler](https://forum.duplicati.com/u/dkebler)\
**Post date:** [January 22, 2019, 3:41am UTC](https://forum.duplicati.com/t/regex-like-tf-rash-supported/6089/1 "2019-01-22T03:41:06Z")

</div>

I added  
`-*[Tt]rash*/`  
to my filters and I expected it to use the regex to exclude either Trash or trash with or without a leading .

Unfortunately it backed up my `.Trash-1000` folder.

What is the correct syntax?

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [January 22, 2019, 8:15am UTC](https://forum.duplicati.com/t/regex-like-tf-rash-supported/6089/2 "2019-01-22T08:15:18Z")

</div>

You seem to be mixing regex and wildcards. Wildcards only supports `*` (any string sequence) and `?` (any character). To use `[Tt]` you need to use a regular expression.

When you are using regex you need a qualifier, so I think you want to do:

```
-[*.[Tt]rash.*/]

```

the surrounding hard brackets `[]` indicate a regex to Duplicati, but if you use the UI and choose “regex” in the dropdown, Duplicati will insert them behind the scenes (click the three dots to see the text representation). You can test the regex’s (excluding the surrounding hard brackets) here:  
[http://regexstorm.net/tester](http://regexstorm.net/tester)

If you prefer wildcards (they are also a bit faster), you can just add two excludes to get the same effect:

```
-*Trash*/
-*trash*/

```
