/whatever/
.*
means wildcard match any character. So when you write something like .*/directory/.*
you are matching any URL that includes the string, /directory/
. So with this example, all of the following URLs would be excluded and NOT downloaded:https://example.com/directory/whatever.html
https://example.com/directory/subdirectory/whatever.html
https://example.com/something/directory/whatever.html
https://example.com/another/deeply/nested/directory/
https://example.com/directory/?anything=whatever