-
-
Notifications
You must be signed in to change notification settings - Fork 228
Wildcards
Massimo Melina edited this page May 8, 2023
·
7 revisions
Some settings support wildcards, like *.jpg
-
*
matches any number of characters, but not /. Eg:*.jpg
-
?
matches a single character, but not /. Eg:pic?.jpg
matchespic1.jpg
andpic2.jpg
but notpic10.jpg
-
**
matches any number of characters, including /, as long as it's the only thing in a path part. Eg:**.jpg
will match jpg-s also in subfolders. -
!
at the beginning of a pattern will negate the match. Eg:!*.jpg
will match any file that is NOT jpg. -
|
allow multiple values to be accepted (as an "or" expression). Eg:*.jpg|*.png
will match both jpg and png
Network masks supports the syntax above, plus CIDR syntax, therefore you can use wildcards like this 192.168.0.*
or use the equivalent CIDR version, that is 192.168.0.1/24
.
From version 0.45, CIDR syntax supports operators !
and |
.
Tip: thanks to the negation operator !
you can turn the blacklist into a whitelist. Example: by blacklisting !192.168.0.*
you are actually whitelisting those addresses. If you have multiple addresses to whitelist, have them all on a single line, joined by |
.