Sure it can, see
http://www.crummy.com/software/Beaut...mentation.html for details.
However, if you are trying to remove particular text, I suggest you search for that text and then remove its parent tag. You can do that by implementing preprocess_html in your recipe.