The only way I've managed to do it is to is to use the inverted mode, and just blacklist everything I don't want it to mine. Be careful, though, as when you do this it'll mine things that aren't normally able to be mined, such as bedrock, buildcraft springs, and gascraft shale.