Is that the task you are
testing? I've just cut-and-paste it and it deletes none of my subdirectories. And indeed it shouldn't, since you don't include the "includeEmptyDirs" attribute of the delete task, so emtpy directories will not be deleted according to the docs.
Re-reading the selector documentation I think your target is flawed anyway. If you use more than one selector (as you do), shouldn't you be combining them with the <and /> element?
Also, remember that Ant is just a
Java application and Java is case-sensitive. So your target will only delete things which include the lower-case
pattern "temp".
This is how I'd write this target:
This deletes all sub-directories of root which contain "temp", regardless of whether they include files or not.