Excluding folders that match an exact name or wildcard is supported. So you can exclude all folders, that say, are named "log" or those that end in log using "*log".
If you're still having trouble, then please post exactly what you want excluded. And specify whether the text you're looking to exclude is at the beginning or at the end of the folder name. I have not personally tested whether the wild card works with asterisks at both ends in order to find folders that contain the text in the middle, but my guess is that works as well.