case insensitive search for head&body end tag