I was to snip a peice of text to ~40 chars ($sniplength in the script) , but I don't want it to cut mid-word, or in a HTML tag. So I thought about taking out all the HTML tags except for <br> and it's variants, and then snip at the first space after the specified snip length.